From 76bd5f4fc386adea201dc2deaf2bec0747109031 Mon Sep 17 00:00:00 2001 From: enrider Date: Tue, 6 Aug 2019 17:56:48 -0400 Subject: [PATCH] Issue #36564 update regex for spread operator (#36565) * Issue #36564 update regex for spread operator * Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> --- ...e-the-spread-operator-to-evaluate-arrays-in-place.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md index 4b3fd76559e..91399c12dee 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.english.md @@ -45,7 +45,7 @@ tests: - text: arr2 should be correct copy of arr1. testString: assert(arr2.every((v, i) => v === arr1[i])); - text: ... spread operator was used to duplicate arr1. - testString: assert(code.match(/\[\s*...arr1\s*\]/g)); + testString: assert(code.match(/Array\(\s*\.\.\.arr1\s*\)|\[\s*\.\.\.arr1\s*\]/)); - text: arr2 should remain unchanged when arr1 is changed. testString: assert((arr1, arr2) => {arr1.push('JUN'); return arr2.length < arr1.length});