From 12a461487301507f297863b7123ad4bd03486b58 Mon Sep 17 00:00:00 2001 From: Vaidic Joshi Date: Sun, 10 Sep 2017 19:43:57 +0530 Subject: [PATCH] fix(seed): Fixed assert regex Closes #13999 --- challenges/04-data-visualization/json-apis-and-ajax.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/04-data-visualization/json-apis-and-ajax.json b/challenges/04-data-visualization/json-apis-and-ajax.json index aa17268d0c..7d2af40824 100644 --- a/challenges/04-data-visualization/json-apis-and-ajax.json +++ b/challenges/04-data-visualization/json-apis-and-ajax.json @@ -232,7 +232,7 @@ "assert(code.match(/new\\s+?XMLHttpRequest\\(\\s*?\\)/g), 'message: Your code should create a new XMLHttpRequest.');", "assert(code.match(/\\.open\\(\\s*?('|\")GET\\1\\s*?,\\s*?('|\")\\/json\\/cats\\.json\\2\\s*?,\\s*?true\\s*?\\)/g), 'message: Your code should use the open method to initialize a \"GET\" request to the freeCodeCamp Cat Photo API.');", "assert(code.match(/\\.send\\(\\s*\\)/g), 'message: Your code should use the send method to send the request.');", - "assert(code.match(/\\.onload=function\\(\\s*?\\)\\s*?{/g), 'message: Your code should have an onload event handler set to a function.');", + "assert(code.match(/\\.onload\\s*=\\s*function\\(\\s*?\\)\\s*?{/g), 'message: Your code should have an onload event handler set to a function.');", "assert(code.match(/JSON\\.parse\\(.*\\.responseText\\)/g), 'message: Your code should use the JSON.parse method to parse the responseText.');", "assert(code.match(/document\\.getElementsByClassName\\(\\s*?('|\")message\\1\\s*?\\)\\[0\\]\\.innerHTML\\s*?=\\s*?JSON\\.stringify\\(.+?\\)/g), 'message: Your code should get the element with class message and change its inner HTML to the string of JSON data.');" ],