lookAndSay
should be a function.
testString: assert(typeof lookAndSay == 'function');
- text: lookAndSay("1")
should return a string.
testString: assert(typeof lookAndSay("1") == 'string');
- text: lookAndSay("1")
should return "11"
.
testString: assert.equal(lookAndSay("1"), "11");
- text: lookAndSay("11")
should return "21"
.
testString: assert.equal(lookAndSay("11"), "21");
- text: lookAndSay("21")
should return "1211"
.
testString: assert.equal(lookAndSay("21"), "1211");
- text: lookAndSay("1211")
should return "111221"
.
testString: assert.equal(lookAndSay("1211"), "111221");
- text: lookAndSay("3542")
should return "13151412"
.
testString: assert.equal(lookAndSay("3542"), "13151412");
```