Merge pull request #6856 from alistermada/fix/test-iterate-through-array

Fix test for Iterate Through An Array With For Loop
pull/18182/head
Rex Schrader 2016-02-09 16:31:24 -08:00
commit 5f912a2761
1 changed files with 1 additions and 1 deletions

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",