* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
1.5 KiB
1.5 KiB
id, title, isRequired, challengeType, videoUrl, localeTitle
id | title | isRequired | challengeType | videoUrl | localeTitle |
---|---|---|---|---|---|
a3566b1109230028080c9345 | Sum All Numbers in a Range | true | 5 | 求和范围中的所有数字 |
Description
Instructions
Tests
tests:
- text: '<code>sumAll([1, 4])</code>应该返回一个数字。'
testString: assert(typeof sumAll([1, 4]) === 'number');
- text: '<code>sumAll([1, 4])</code>应该返回10。'
testString: assert.deepEqual(sumAll([1, 4]), 10);
- text: '<code>sumAll([4, 1])</code>应该返回10。'
testString: assert.deepEqual(sumAll([4, 1]), 10);
- text: '<code>sumAll([5, 10])</code>应该返回45。'
testString: assert.deepEqual(sumAll([5, 10]), 45);
- text: '<code>sumAll([10, 5])</code>应该返回45。'
testString: assert.deepEqual(sumAll([10, 5]), 45);
Challenge Seed
function sumAll(arr) {
return 1;
}
sumAll([1, 4]);
Solution
// solution required