From 88b792579f0588f52755b294a82405a7c0304363 Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Sat, 4 Feb 2017 02:10:41 +0100 Subject: [PATCH] fix(challenge): Accept more correct solutions for "Use dot notation" Now accepts either one or two `console.log()` expressions. --- .../object-oriented-programming.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json index c091f47dd7..3e76504520 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json +++ b/challenges/02-javascript-algorithms-and-data-structures/object-oriented-programming.json @@ -83,8 +83,8 @@ "" ], "tests": [ - "assert(code.match(/console\\.log\\(dog\\.name\\)/g), 'message: Your code should use a console.log statement to print the value for the name property of the dog object.');", - "assert(code.match(/console\\.log\\(dog\\.numLegs\\)/g), 'message: Your code should use a console.log statement to print the value for the numLegs property of the dog object.');" + "assert(/console.log\\(.*dog\\.name.*\\)/g.test(code), 'message: Your should use console.log to print the value for the name property of the dog object.');", + "assert(/console.log\\(.*dog\\.numLegs.*\\)/g.test(code), 'message: Your should use console.log to print the value for the numLegs property of the dog object.');" ], "solutions": [], "hints": [], @@ -992,4 +992,4 @@ "translations": {} } ] -} \ No newline at end of file +}