From 3b783ac9ae91def4d8868a397eeff01331621ebf Mon Sep 17 00:00:00 2001 From: patsul12 Date: Sat, 2 Jan 2016 10:26:23 -0800 Subject: [PATCH] add test to make sure the user did not redeclare the var difference --- .../basic-javascript.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index e55877357d..9e91d3a052 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -316,7 +316,8 @@ ], "tests": [ "assert(difference === 12, 'message: Make the variable difference equal 12.');", - "assert(/\\d+\\s*-\\s*\\d+/.test(code),'message: User the - operator');" + "assert((code).match(/difference/g).length === 1,'message: Only change the first line');", + "assert(/\\d+\\s*-\\s*\\d+/.test(code),'message: Use the - operator');" ], "type": "waypoint", "challengeType": "1"