From 4b1c5ebc7aa75484b464a91be6d04ce2cb5b9da1 Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Tue, 26 Jun 2018 02:20:21 +0900 Subject: [PATCH] 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 --- .../02-javascript-algorithms-and-data-structures/es6.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/es6.json b/challenges/02-javascript-algorithms-and-data-structures/es6.json index 3d6243a695..6f5dbb1e87 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -1015,7 +1015,7 @@ { "text": "Template strings were used", "testString": - "getUserInput => assert(getUserInput('index').match(/\\`
  • \\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used');" + "getUserInput => assert(getUserInput('index').match(/\\`
  • \\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",