Fix test for Iterate Through An Array With For Loop

This commit is contained in:
Alister N. Mada
2016-02-10 06:29:11 +07:00
parent e18ef9c183
commit 7ad4ef5b44

View File

@ -4200,7 +4200,7 @@
"tests": [
"assert(code.match(/var\\s*total\\s*=\\s*0\\s*;/), 'message: <code>total</code> should be declared and initialized to 0');",
"assert(total === 20, 'message: <code>total</code> should equal 20');",
"assert(code.match(/for\\s*\\(/g).length > 1 && code.match(/\\+=\\s*myArr/), 'message: You should use a <code>for</code> loop to iterate through <code>myArr</code>');",
"assert(code.match(/for\\s*\\(/g).length > 1 && code.match(/myArr\\s*\\[/), 'message: You should use a <code>for</code> loop to iterate through <code>myArr</code>');",
"assert(!code.match(/total[\\s\\+\\-]*=\\s*(\\d(?!\\s*;)|[1-9])/g), 'message: Do not set <code>total</code> to 20 directly');"
],
"type": "waypoint",