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

Commit

Permalink
fix(challenges): change test for template literals challenge (#37)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
scissorsneedfoodtoo authored and raisedadead committed Jun 29, 2018
1 parent 6bb62c7 commit 4b1c5eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@
{
"text": "Template strings were used",
"testString":
"getUserInput => assert(getUserInput('index').match(/\\`<li class=\"text-warning\">\\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used');"
"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');"
}
],
"releasedOn": "Feb 17, 2017",
Expand Down

0 comments on commit 4b1c5eb

Please sign in to comment.