From 706e1aa2f3d5f70f2bbfd706750f8b998d5fdc23 Mon Sep 17 00:00:00 2001 From: Ethan Arrowood Date: Fri, 24 Feb 2017 22:07:28 -0500 Subject: [PATCH] Modified test to test for function not regex match --- seed/challenges/04-data-visualization/json-apis-and-ajax.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/04-data-visualization/json-apis-and-ajax.json b/seed/challenges/04-data-visualization/json-apis-and-ajax.json index 91a3c16253..0461c69773 100644 --- a/seed/challenges/04-data-visualization/json-apis-and-ajax.json +++ b/seed/challenges/04-data-visualization/json-apis-and-ajax.json @@ -88,7 +88,7 @@ ], "tests": [ "assert(code.match(/document\\.getElementById\\(\\s*?('|\")getMessage\\1\\s*?\\)/g), 'message: Your code should use the document.getElementById method to select the getMessage element.');", - "assert(code.match(/\\.onclick=function\\(\\s*?\\)\\s*?{\\s*?};/g), 'message: Your code should add an onclick event handler.');" + "assert(typeof document.getElementById('getMessage').onclick === 'function', 'message: Your code should add an onclick event handler.');" ], "solutions": [], "hints": [], @@ -691,4 +691,4 @@ "translations": {} } ] -} \ No newline at end of file +}