Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Commit 4b1c5eb

Browse files
scissorsneedfoodtooraisedadead
authored andcommitted
fix(challenges): change test for template literals challenge (#37)
The original test was too rigid, and many users were forced to use one solution, usually map, to complete the challenge. The test is changed here to allow for multiple solutions to the problem, including the use of either single or double quotes when naming a class. BREAKING CHANGE: None
1 parent 6bb62c7 commit 4b1c5eb

File tree

1 file changed

+1
-1
lines changed
  • challenges/02-javascript-algorithms-and-data-structures

1 file changed

+1
-1
lines changed

challenges/02-javascript-algorithms-and-data-structures/es6.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@
10151015
{
10161016
"text": "Template strings were used",
10171017
"testString":
1018-
"getUserInput => assert(getUserInput('index').match(/\\`<li class=\"text-warning\">\\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used');"
1018+
"getUserInput => assert(getUserInput('index').match(/\\`<li \\s*class\\s*=\\s*(\"\\s*text-warning\\s*\"|\\'\\s*text-warning\\s*\\')\\s*>\\s*\\$\\s*\\{(\\s*\\w+\\s*|\\s*\\w+\\s*\\[\\s*[\\w]+\\s*\\]\\s*)\\}\\s*<\\s*/li\\s*>\\`/g), 'Template strings were used');"
10191019
}
10201020
],
10211021
"releasedOn": "Feb 17, 2017",

0 commit comments

Comments
 (0)