From d4ad420cf42fbd4c938b98231c01957110e75090 Mon Sep 17 00:00:00 2001 From: Will Garcia Date: Sun, 29 Oct 2017 16:37:28 -0400 Subject: [PATCH] fix: add 2nd regex check for bracket notation --- .../basic-algorithm-scripting.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json b/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json index 4e6765d1cf..10b5a1a558 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json +++ b/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json @@ -391,7 +391,7 @@ "assert(confirmEnding(\"Open sesame\", \"game\") === false, 'message: confirmEnding(\"Open sesame\", \"game\") should return false.');", "assert(confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, 'message: confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") should return false.');", "assert(confirmEnding(\"Abstraction\", \"action\") === true, 'message: confirmEnding(\"Abstraction\", \"action\") should return true.');", - "assert(!/\\.endsWith\\(.*?\\)\\s*?;?/.test(code), 'message: Do not use the built-in method .endsWith() to solve the challenge.');" + "assert(!(/\\.endsWith\\(.*?\\)\\s*?;?/.test(code)) && !(/\\['endsWith'\\]/.test(code)), 'message: Do not use the built-in method .endsWith() to solve the challenge.');" ], "type": "bonfire", "isRequired": true,