add test to make sure the user did not redeclare the var difference

This commit is contained in:
patsul12
2016-01-02 10:26:23 -08:00
parent 057b5eacd7
commit 3b783ac9ae

View File

@ -316,7 +316,8 @@
],
"tests": [
"assert(difference === 12, 'message: Make the variable <code>difference</code> equal 12.');",
"assert(/\\d+\\s*-\\s*\\d+/.test(code),'message: User the <code>-</code> operator');"
"assert((code).match(/difference/g).length === 1,'message: Only change the first line');",
"assert(/\\d+\\s*-\\s*\\d+/.test(code),'message: Use the <code>-</code> operator');"
],
"type": "waypoint",
"challengeType": "1"