diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.english.md index fa4132f5a7..538ffd9666 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.english.md @@ -45,10 +45,10 @@ tests: testString: getUserInput => assert(!getUserInput('index').match(/var/g)); - text: myConcat should be a constant variable (by using const). testString: getUserInput => assert(getUserInput('index').match(/const\s+myConcat/g)); - - text: myConcat should be a function. - testString: assert(typeof myConcat === 'function'); + - text: myConcat should be an arrow function with two parameters + testString: assert(/myConcat=\(\w+,\w+\)=>/.test(code.replace(/\s/g, '')) && typeof myConcat === 'function'); - text: myConcat() should return [1, 2, 3, 4, 5]. - testString: assert(() => { const a = myConcat([1], [2]); return a[0] == 1 && a[1] == 2; }); + testString: assert.deepEqual(myConcat([1, 2], [3, 4, 5]), [1, 2, 3, 4, 5]); - text: function keyword should not be used. testString: getUserInput => assert(!getUserInput('index').match(/function/g));