From 9f6d2410c145cb4786cb3a1b9b15902773004603 Mon Sep 17 00:00:00 2001 From: natac13 Date: Fri, 18 Sep 2015 18:34:37 -0400 Subject: [PATCH] added optional space to the editor match in OOP challenges. closes #3331 --- .../object-oriented-and-functional-programming.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 2da91ee5a6..24a6ec4a17 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -185,7 +185,7 @@ ], "tests":[ "assert.deepEqual(array, [4,5,6,7,8], 'message: You should add three to each value in the array.');", - "assert(editor.getValue().match(/\\.map\\(/gi), 'message: You should be making use of the map method.');", + "assert(editor.getValue().match(/\\.map\\s*\\(/gi), 'message: You should be making use of the map method.');", "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\]/gi), 'message: You should only modify the array with .map.');" ], "challengeSeed":[ @@ -213,7 +213,7 @@ ], "tests":[ "assert(singleVal == 30, 'message: singleVal should have been set to the result of your reduce operation.');", - "assert(editor.getValue().match(/\\.reduce\\(/gi), 'message: You should have made use of the reduce method.');" + "assert(editor.getValue().match(/\\.reduce\\s*\\(/gi), 'message: You should have made use of the reduce method.');" ], "challengeSeed":[ "var array = [4,5,6,7,8];", @@ -241,7 +241,7 @@ ], "tests":[ "assert.deepEqual(array, [1,2,3,4], 'message: You should have removed all the values from the array that are greater than 4.');", - "assert(editor.getValue().match(/array\\.filter\\(/gi), 'message: You should be using the filter method to remove the values from the array.');", + "assert(editor.getValue().match(/array\\.filter\\s*\\(/gi), 'message: You should be using the filter method to remove the values from the array.');", "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7\\,8\\,9\\,10\\]/gi), 'message: You should only be using .filter to modify the contents of the array.');" ], "challengeSeed":[ @@ -269,7 +269,7 @@ "tests":[ "assert.deepEqual(array, ['alpha', 'beta', 'charlie'], 'message: You should have sorted the array alphabetically.');", "assert(editor.getValue().match(/\\[\\'beta\\'\\,\\s\\'alpha\\'\\,\\s'charlie\\'\\];/gi), 'message: You should be sorting the array using sort.');", - "assert(editor.getValue().match(/\\.sort\\(\\)/gi), 'message: You should have made use of the sort method.');" + "assert(editor.getValue().match(/\\.sort\\s*\\(\\)/gi), 'message: You should have made use of the sort method.');" ], "challengeSeed":[ "var array = ['beta', 'alpha', 'charlie'];", @@ -291,7 +291,7 @@ ], "tests": [ "assert.deepEqual(array, [7,6,5,4,3,2,1], 'message: You should reverse the array.');", - "assert(editor.getValue().match(/\\.reverse\\(\\)/gi), 'message: You should use the reverse method.');", + "assert(editor.getValue().match(/\\.reverse\\s*\\(\\)/gi), 'message: You should use the reverse method.');", "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7/gi), 'message: You should return [7,6,5,4,3,2,1].');" ], "challengeSeed": [ @@ -315,7 +315,7 @@ ], "tests": [ "assert.deepEqual(array, [1,2,3,4,5,6], 'You should concat the two arrays together.');", - "assert(editor.getValue().match(/\\.concat\\(/gi), 'message: You should be use the concat method to merge the two arrays.');", + "assert(editor.getValue().match(/\\.concat\\s*\\(/gi), 'message: You should be use the concat method to merge the two arrays.');", "assert(editor.getValue().match(/\\[1\\,2\\,3\\]/gi) && editor.getValue().match(/\\[4\\,5\\,6\\]/gi), 'message: You should only modify the two arrays without changing the origional ones.');" ], "challengeSeed": [