Update test for regex challenge

Add more lenient tests for the "Sift through Text with Regular Expressions" challenge.
pull/11026/head
Anthony Ng 2016-10-02 18:19:06 -04:00
parent f529067c04
commit 24a147001e
1 changed files with 1 additions and 1 deletions

View File

@ -5624,7 +5624,7 @@
],
"tests": [
"assert(andCount==2, 'message: Your <code>regular expression</code> should find two occurrences of the word <code>and</code>.');",
"assert(code.match(/\\/and\\/gi/), 'message: Use <code>regular expressions</code> to find the word <code>and</code> in <code>testString</code>.');"
"assert(code.match(/\\/and\\/gi/) || code.match(/\\/\\\\band\\\\b\\/gi/) || code.match(/\\/\\(\\?\\:\\\\b\\)and\\(\\?\\:\\\\b\\)\\/gi/), 'message: Use <code>regular expressions</code> to find the word <code>and</code> in <code>testString</code>.');"
],
"type": "waypoint",
"challengeType": 1,