From 69d4d4fe2fc45240dd84e3934a707d804cd5ceb6 Mon Sep 17 00:00:00 2001 From: Tom <20648924+moT01@users.noreply.github.com> Date: Tue, 22 Oct 2019 13:48:40 -0500 Subject: [PATCH] fix: recursion test (#37419) * fix(challenge): recursion test * fix(challenge): replace regex s flag with g --- .../basic-javascript/replace-loops-using-recursion.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.english.md index 0f3d19df48..0106910d68 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.english.md @@ -57,7 +57,7 @@ tests: - text: Your code should not rely on any kind of loops (for or while or higher order functions such as forEach, map, filter, or reduce.). testString: assert(!removeJSComments(code).match(/for|while|forEach|map|filter|reduce/g)); - text: You should use recursion to solve this problem. - testString: assert(removeJSComments(sum.toString()).match(/sum\(.*\).*\{.*sum\(.*\).*\}/s)); + testString: assert(removeJSComments(sum.toString()).match(/sum\(.*\)/g).length > 1); ```