sumDigits
should be a function.
testString: assert(typeof sumDigits == 'function', 'sumDigits
should be a function.');
- text: sumDigits("1")
should return a number.
testString: assert(typeof sumDigits("1") == 'number', 'sumDigits("1")
should return a number.');
- text: sumDigits("1")
should return 1
.
testString: assert.equal(sumDigits("1"), 1, 'sumDigits("1")
should return 1
.');
- text: sumDigits("12345")
should return 15
.
testString: assert.equal(sumDigits("12345"), 15, 'sumDigits("12345")
should return 15
.');
- text: sumDigits("254")
should return 11
.
testString: assert.equal(sumDigits("254"), 11, 'sumDigits("254")
should return 11
.');
- text: sumDigits("fe")
should return 29
.
testString: assert.equal(sumDigits("fe"), 29, 'sumDigits("fe")
should return 29
.');
- text: sumDigits("f0e")
should return 29
.
testString: assert.equal(sumDigits("f0e"), 29, 'sumDigits("f0e")
should return 29
.');
- text: sumDigits("999ABCXYZ")
should return 162
.
testString: assert.equal(sumDigits("999ABCXYZ"), 162, 'sumDigits("999ABCXYZ")
should return 162
.');
```