From c700977ee9a92f17a3b77bdb0a64d3e13ed226e7 Mon Sep 17 00:00:00 2001 From: BKinahan Date: Sun, 14 Aug 2016 22:50:24 +0000 Subject: [PATCH] Adjust tests for accessing multidimensional arrays --- .../basic-javascript.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index bc5999a515..16a16d37f0 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -1981,8 +1981,7 @@ ], "tests": [ "assert(myData === 8, 'message: myData should be equal to 8.');", - "assert(/myArray\\[\\d+\\]\\[\\d+\\]/g.test(code), 'message: You should be using bracket notation to read the value from myArray.');", - "assert(/myData\\s*?=\\s*?myArray\\[\\d+\\]\\[\\d+\\]\\s*?;/g.test(code), 'message: You should only be reading one value from myArray.');" + "assert(/myArray\\[2\\]\\[1\\]/g.test(code) && !/myData\\s*=\\s*(?:.*[-+*/%]|\\d)/g.test(code), 'message: You should be using bracket notation to read the correct value from myArray.');" ], "type": "waypoint", "challengeType": 1,