From 3b27888abd625b4d97e081f83531fcb0013ef234 Mon Sep 17 00:00:00 2001 From: Stuart Date: Sat, 11 Jun 2016 07:29:25 +0100 Subject: [PATCH] Fix/Prefilter JSON --- .../json-apis-and-ajax.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/json-apis-and-ajax.json b/challenges/01-front-end-development-certification/json-apis-and-ajax.json index 6853ddd698..a5c762dea5 100644 --- a/challenges/01-front-end-development-certification/json-apis-and-ajax.json +++ b/challenges/01-front-end-development-certification/json-apis-and-ajax.json @@ -419,7 +419,8 @@ "" ], "tests": [ - "assert(code.match(/filter/gi), 'message: You should be making use of the .filter method.');" + "assert(code.match(/json.filter\\(\\s*?function\\(/), 'message: You should be making use of the .filter method. ');", + "assert(code.match(/return\\s*?\\(\\s*?\\w+\\.id\\s*?!==\\s*?1\\s*?\\);/), 'message: Your function should only return images with a value not equal to 1. ');" ], "type": "waypoint", "challengeType": 0,