From c2558b3816b33254fe42648dc865c104ecb9430b Mon Sep 17 00:00:00 2001 From: Ashraf Nazar Date: Thu, 23 Apr 2020 20:59:58 +0100 Subject: [PATCH] =?UTF-8?q?fix(Curriculum):=20ensure=20code=20that=20inclu?= =?UTF-8?q?des=20and=20is=20not=20equal=20to=20the=20fl=E2=80=A6=20(#38497?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Curriculum): ensure code that includes and is not equal to the flat or flatMap methods do not fail the test suite * Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * Update steamroller.english.md Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> --- .../intermediate-algorithm-scripting/steamroller.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md index fa0d52c18b..6067408bbc 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md @@ -33,7 +33,7 @@ tests: - text: steamrollArray([1, {}, [3, [[4]]]]) should return [1, {}, 3, 4]. testString: assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]); - text: Your solution should not use the Array.prototype.flat() or Array.prototype.flatMap() methods. - testString: assert(!code.match(/\.?[\s\S]*?flat/) && !code.match(/\.?[\s\S]*?flatMap/)); + testString: assert(!code.match(/\.\s*flat\s*\(/) && !code.match(/\.\s*flatMap\s*\(/)); ```