From 9b2ffb1a9de22b8cf04b700113f340164656b32e Mon Sep 17 00:00:00 2001 From: patsul12 Date: Sun, 10 Jan 2016 13:50:58 -0800 Subject: [PATCH] add tests --- .../basic-javascript.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index d646a637a3d..3d4c989958f 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -920,7 +920,9 @@ ], "tests": [ "assert(myStr === \"This is the start. This is the end.\", 'message: myStr should have a value of This is the start. This is the end.');", - "assert(/var\\s+myStr\\s*=\\s*([\"'])This is the start\\. \\1\\s*\\+\\s*([\"'])This is the end\\.([\"'])/.test(code), 'message: Use the + operator to build myStr');" + "assert(code.match(/([\"']).*([\"'])\\s*\\+\\s*([\"']).*([\"'])/g).length > 1, 'message: Use the + operator to build myStr');", + "assert(/var\\s+myStr/.test(code), 'message: myStr should be created using the var keyword.');", + "assert(/myStr\\s*=/.test(code), 'message: Make sure to assign the result to the myStr variable.');" ], "type": "waypoint", "challengeType": 1