diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.english.md index 46bdf11905..33f501d582 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.english.md @@ -26,16 +26,16 @@ Rewrite the function assigned to the variable magic which returns a ```yml tests: - - text: User did replace var keyword. - testString: getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace var keyword.'); + - text: User should replace var keyword. + testString: getUserInput => assert(!getUserInput('index').match(/var/g)); - text: magic should be a constant variable (by using const). - testString: getUserInput => assert(getUserInput('index').match(/const\s+magic/g), 'magic should be a constant variable (by using const).'); - - text: magic is a function. - testString: assert(typeof magic === 'function', 'magic is a function.'); - - text: magic() returns correct date. - testString: assert(magic().getDate() == new Date().getDate(), 'magic() returns correct date.'); - - text: function keyword was not used. - testString: getUserInput => assert(!getUserInput('index').match(/function/g), 'function keyword was not used.'); + testString: getUserInput => assert(getUserInput('index').match(/const\s+magic/g)); + - text: magic should be a function. + testString: assert(typeof magic === 'function'); + - text: magic() should return correct date. + testString: assert(magic().setHours(0,0,0,0) === new Date().setHours(0,0,0,0)); + - text: function keyword should not be used. + testString: getUserInput => assert(!getUserInput('index').match(/function/g)); ```