From 503aa2f986a909205a8e642dc409e9f283078a90 Mon Sep 17 00:00:00 2001
From: Julien
Date: Mon, 2 Oct 2017 14:15:17 +0200
Subject: [PATCH] fix(challenges): Fix vague tests for "Convert JSON Data to
HTML" challenge
---
challenges/04-data-visualization/json-apis-and-ajax.json | 4 +++-
1 file changed, 3 insertions(+), 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 7d2af40824d..8ee8cf6aa3c 100644
--- a/challenges/04-data-visualization/json-apis-and-ajax.json
+++ b/challenges/04-data-visualization/json-apis-and-ajax.json
@@ -396,7 +396,9 @@
"
"
],
"tests": [
- "assert(code.match(/json\\.forEach/g), 'message: Your code should use a forEach
method to loop over the JSON data from the API.');"
+ "assert(code.match(/html\\s+?(\\+=|=\\shtml\\s\\+)/g), 'message: Your code should store the data in the html
variable');",
+ "assert(code.match(/json\\.forEach/g), 'message: Your code should use a forEach
method to loop over the JSON data from the API.');",
+ "assert(code.match(/.+<\\/strong>/g), 'message: Your code should wrap the key names in strong
tags.');"
],
"solutions": [],
"hints": [],