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