Add tests to es6 challenge Write Higher Order Arrow Functions. Doesn't have es6 syntax tests.

Comments out function and arrow tests that didn't work and fixes formatting issues.
pull/18182/head
Milo Hartsoe 2017-05-27 15:24:52 -04:00
parent 51ae1a4c2b
commit 98d75156f4
1 changed files with 8 additions and 8 deletions

View File

@ -265,14 +265,14 @@
"console.log(squaredIntegers);"
],
"tests": [
"// Test user did replace var keyword",
"// Test squaredIntegers is const",
"// Test squaredIntegers is an array",
"// Test squaredIntegers is [16, 1764, 36]",
"// Test function keyword was not used",
"// Test arrow => was used",
"// Test loop was not used",
"// Test map and filter were used"
"// Test user did replace <code>var</code> keyword",
"// Test <code>squaredIntegers</code> is <code>const</code>",
"assert(Array.isArray(squaredIntegers), 'message: <code>squaredIntegers</code> should be an array');",
"assert(squaredIntegers[0] === 16 && squaredIntegers[1] === 1764 && squaredIntegers[2] === 36, 'message: <code>squaredIntegers</code> should be <code>[16, 1764, 36]</code>');",
"// Test <code>function</code> keyword was not used",
"// Test arrow <code>=></code> was used",
"assert(!code.match(/(for)|(while)/g), 'message: loop should not be used');",
"assert(code.match(/map/g) && code.match(/filter/g), 'message: <code>map</code> and <code>filter</code> should be used');"
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",