From e99a6357c06bf3d726ca4e2aa641a5615ad10e47 Mon Sep 17 00:00:00 2001 From: dhcodes Date: Wed, 14 Jun 2017 21:08:47 -0500 Subject: [PATCH] change tests to reflect desired solution --- .../basic-javascript.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index 51585e511e..d7c48f32b5 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -536,7 +536,7 @@ ], "tests": [ "assert(myVar === 88, 'message: myVar should equal 88');", - "assert(/myVar\\s*\\=.*myVar\\s*\\+\\s*1/.test(code) === false, 'message: myVar = myVar + 1; should be changed');", + "assert(/var\\s*myVar\\s*=\\s*87;\\s*\\/*.*\\s*myVar\\+\\+;/.test(code), 'message: myVar = myVar + 1; should be changed');", "assert(/[+]{2}\\s*myVar|myVar\\s*[+]{2}/.test(code), 'message: Use the ++ operator');", "assert(/var myVar = 87;/.test(code), 'message: Do not change code above the line');" ], @@ -585,6 +585,7 @@ ], "tests": [ "assert(myVar === 10, 'message: myVar should equal 10');", + "assert(/var\\s*myVar\\s*=\\s*11;\\s*\\/*.*\\s*myVar--;/.test(code), 'message: myVar = myVar - 1; should be changed');", "assert(/[-]{2}\\s*myVar|myVar\\s*[-]{2}/.test(code), 'message: Use the -- operator on myVar');", "assert(/var myVar = 11;/.test(code), 'message: Do not change code above the line');" ],