Skip to content

Commit 53e92aa

Browse files
author
Jonathan
authored
Merge pull request freeCodeCamp#9308 from sthodup1/fix/test-clarity
basicJavascript.json - Clarify testing criteria
2 parents af9b382 + bf485dd commit 53e92aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seed/challenges/01-front-end-development-certification/basic-javascript.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,8 +3639,8 @@
36393639
"function chainToSwitch(val) {\n var answer = \"\";\n\n switch (val) {\n case \"bob\":\n answer = \"Marley\";\n break;\n case 42:\n answer = \"The Answer\";\n break;\n case 1:\n answer = \"There is no #1\";\n break;\n case 99:\n answer = \"Missed me by this much!\";\n break;\n case 7:\n answer = \"Ate Nine\";\n }\n return answer; \n}"
36403640
],
36413641
"tests": [
3642-
"assert(!/else/g.test(code), 'message: You should not use any <code>else</code> statements');",
3643-
"assert(!/if/g.test(code), 'message: You should not use any <code>if</code> statements');",
3642+
"assert(!/else/g.test(code), 'message: You should not use any <code>else</code> statements anywhere in the editor');",
3643+
"assert(!/if/g.test(code), 'message: You should not use any <code>if</code> statements anywhere in the editor');",
36443644
"assert(code.match(/break/g).length >= 4, 'message: You should have at least four <code>break</code> statements');",
36453645
"assert(chainToSwitch(\"bob\") === \"Marley\", 'message: <code>chainToSwitch(\"bob\")</code> should be \"Marley\"');",
36463646
"assert(chainToSwitch(42) === \"The Answer\", 'message: <code>chainToSwitch(42)</code> should be \"The Answer\"');",

0 commit comments

Comments
 (0)