fix(challenge): Fix tests for "Basic JS: Global scope and functions"

Since the last test case was triggering on a line from the challenge
head, it was necessary to slightly modify the test cases.

They now let the expected code pass.
pull/18182/head
Samuel Plumppu 2017-02-24 23:45:22 +01:00
parent f80ec42c47
commit 06abf92469
1 changed files with 2 additions and 3 deletions

View File

@ -2436,8 +2436,7 @@
"assert(typeof myGlobal != \"undefined\", 'message: <code>myGlobal</code> should be defined');", "assert(typeof myGlobal != \"undefined\", 'message: <code>myGlobal</code> should be defined');",
"assert(myGlobal === 10, 'message: <code>myGlobal</code> should have a value of <code>10</code>');", "assert(myGlobal === 10, 'message: <code>myGlobal</code> should have a value of <code>10</code>');",
"assert(/var\\s+myGlobal/.test(code), 'message: <code>myGlobal</code> should be declared using the <code>var</code> keyword');", "assert(/var\\s+myGlobal/.test(code), 'message: <code>myGlobal</code> should be declared using the <code>var</code> keyword');",
"assert(typeof oopsGlobal != \"undefined\" && oopsGlobal === 5, 'message: <code>oopsGlobal</code> should have a value of <code>5</code>');", "assert(typeof oopsGlobal != \"undefined\" && oopsGlobal === 5, 'message: <code>oopsGlobal</code> should be a global variable and have a value of <code>5</code>');"
"assert(!/var\\s+oopsGlobal/.test(code), 'message: Do not declare <code>oopsGlobal</code> using the <code>var</code> keyword');"
], ],
"type": "waypoint", "type": "waypoint",
"challengeType": 1, "challengeType": 1,
@ -5671,4 +5670,4 @@
"translations": {} "translations": {}
} }
] ]
} }