fix(challenge): stricter tests for "Add Items Using splice()".

pull/18182/head
Samuel Plumppu 2017-02-02 12:34:25 +01:00
parent d2ecf2e8b9
commit f75a334e5c
1 changed files with 3 additions and 1 deletions

View File

@ -227,7 +227,9 @@
], ],
"tests": [ "tests": [
"assert.deepEqual(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']), ['DarkSalmon', 'BlanchedAlmond', 'LavenderBlush', 'PaleTurqoise', 'FireBrick'], 'message: <code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>');", "assert.deepEqual(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']), ['DarkSalmon', 'BlanchedAlmond', 'LavenderBlush', 'PaleTurqoise', 'FireBrick'], 'message: <code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>');",
"assert.notStrictEqual(htmlColorNames.toString().search(/\\.splice\\(/), -1, 'message: The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method');" "assert(/.splice/.test(code), 'message: The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method');",
"assert(!/shift|unshift/.test(code), 'message: You should not use <code>shift()</code> or <code>unshift()</code>.');",
"assert(!/\\[\\d\\]\\s*=/.test(code), 'message: You should not use array bracket notation.');"
], ],
"type": "waypoint", "type": "waypoint",
"solutions": [], "solutions": [],