fix: recursion test (#37419)

* fix(challenge): recursion test

* fix(challenge): replace regex s flag with g
This commit is contained in:
Tom
2019-10-22 13:48:40 -05:00
committed by mrugesh
parent b9014e2ceb
commit 69d4d4fe2f

View File

@ -57,7 +57,7 @@ tests:
- text: Your code should not rely on any kind of loops (<code>for</code> or <code>while</code> or higher order functions such as <code>forEach</code>, <code>map</code>, <code>filter</code>, or <code>reduce</code>.).
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);
```
</section>