1.2 KiB
1.2 KiB
title | id | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
Word wrap | 594810f028c0303b75339ad4 | 5 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert.equal(typeof wrap, "function", "wrap must be a function.");'
- text: ''
testString: 'assert.equal(typeof wrap("abc", 10), "string", "wrap must return a string.");'
- text: ''
testString: 'assert(wrapped80.split("\n").length === 4, "wrap(80) must return 4 lines.");'
- text: ''
testString: 'assert.equal(wrapped80.split("\n")[0], firstRow80, "Your <code>wrap</code> function should return our expected text");'
- text: ''
testString: 'assert(wrapped42.split("\n").length === 7, "wrap(42) must return 7 lines.");'
- text: ''
testString: 'assert.equal(wrapped42.split("\n")[0], firstRow42, "Your <code>wrap</code> function should return our expected text");'
Challenge Seed
function wrap (text, limit) {
return text;
}
After Test
console.info('after the test');
Solution
// solution required