add tests
parent
45741c2990
commit
9b2ffb1a9d
|
@ -920,7 +920,9 @@
|
|||
],
|
||||
"tests": [
|
||||
"assert(myStr === \"This is the start. This is the end.\", 'message: <code>myStr</code> should have a value of <code>This is the start. This is the end.</code>');",
|
||||
"assert(/var\\s+myStr\\s*=\\s*([\"'])This is the start\\. \\1\\s*\\+\\s*([\"'])This is the end\\.([\"'])/.test(code), 'message: Use the <code>+</code> operator to build <code>myStr</code>');"
|
||||
"assert(code.match(/([\"']).*([\"'])\\s*\\+\\s*([\"']).*([\"'])/g).length > 1, 'message: Use the <code>+</code> operator to build <code>myStr</code>');",
|
||||
"assert(/var\\s+myStr/.test(code), 'message: <code>myStr</code> should be created using the <code>var</code> keyword.');",
|
||||
"assert(/myStr\\s*=/.test(code), 'message: Make sure to assign the result to the <code>myStr</code> variable.');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
"challengeType": 1
|
||||
|
|
Loading…
Reference in New Issue