From d67ec6042255bbee6464f690b8ffb03f295b003f Mon Sep 17 00:00:00 2001 From: Raja Gopal M Date: Thu, 31 Dec 2015 19:30:13 +0530 Subject: [PATCH] Fix #5634 - bugs in return string and test cases in 'Else If' waypoint Updated the .json file to have correct return string in the seed of 'Waypoint Challenge: Introduction to Else If Statements' As well, corrected test case bugs in this commit --- .../basic-javascript.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 dcf7274e6f..11a0a46651 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -2740,7 +2740,7 @@ "challengeSeed": [ "function myTest(val) {", " if(val > 10) {", - " return \"10 or Bigger\";", + " return \"Greater than 10\";", " }", " ", " if(val < 5) {", @@ -2755,16 +2755,16 @@ "" ], "solutions": [ - "function myTest(val) {\n if(val > 10) {\n return \"10 or Bigger\";\n } else if(val < 5) {\n return \"Smaller than 5\";\n } else {\n return \"Between 5 and 10\";\n }\n}" + "function myTest(val) {\n if(val > 10) {\n return \"Greater than 10\";\n } else if(val < 5) {\n return \"Smaller than 5\";\n } else {\n return \"Between 5 and 10\";\n }\n}" ], "tests": [ "assert(code.match(/else/g).length > 1, 'message: You should have at least two else statements');", "assert(code.match(/if/g).length > 1, 'message: You should have at least two if statements');", - "assert(myTest(0) === \"Smaller than 5\", 'message: myTest(4) should return \"Smaller than 5\"');", - "assert(myTest(5) === \"Between 5 and 10\", 'message: myTest(5) should return \"Smaller than 5\"');", + "assert(myTest(0) === \"Smaller than 5\", 'message: myTest(0) should return \"Smaller than 5\"');", + "assert(myTest(5) === \"Between 5 and 10\", 'message: myTest(5) should return \"Between 5 and 10\"');", "assert(myTest(7) === \"Between 5 and 10\", 'message: myTest(7) should return \"Between 5 and 10\"');", "assert(myTest(10) === \"Between 5 and 10\", 'message: myTest(10) should return \"Between 5 and 10\"');", - "assert(myTest(12) === \"10 or Bigger\", 'message: myTest(12) should return \"10 or Bigger\"');" + "assert(myTest(12) === \"Greater than 10\", 'message: myTest(12) should return \"Greater than 10\"');" ], "type": "waypoint", "challengeType": "1",