From 69c96496ec7b08786bbc7cf29911ec3d1d734c85 Mon Sep 17 00:00:00 2001 From: SaintPeter Date: Fri, 31 Jul 2015 17:58:14 -0700 Subject: [PATCH 1/3] Added additional tests to Sorted Union Bonfire --- challenges/basic-bonfires.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index b2a49c8ce3..36b9c4b1c0 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -1074,9 +1074,12 @@ ], "tests": [ "assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');", - "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'should not flatten nested arrays');" + "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'should not flatten nested arrays');", + "assert.deepEqual(unite([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'should correctly handle exactly two arguments');", + "assert.deepEqual(unite([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [ 1, 2, 3, 5, 4, 6, 7, 8 ], 'should correctly handle higher numbers of arguments');" ], "MDNlinks": [ + "Arguments object", "Array.reduce()" ], "challengeType": 5, From fdd16820efa4972e7f8c4dc1703a9ea45c8668d0 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Sat, 1 Aug 2015 19:12:44 +0100 Subject: [PATCH 2/3] Added extra regex moving on to fix scroller without those new images --- challenges/basic-javascript.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index ab02c594ae..cd682bd51f 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1069,6 +1069,35 @@ ], "challengeType": 1 }, + { + "id":"cf1111c1c13feddfaeb3bdef", + "name":"Inverting a Match", + "dashedName":"waypoint-inverting-a-match", + "difficulty":"9.987", + "description":[ + "", + "Use /\\S+/gi; to match everything that ins't a space in the string", + "You can invert any match by using the uppercase version of the selector \\s versus \\S for example" + ], + "tests":[ + "assert(test === 36, 'Your RegEx should have found seven spaces in the testString');", + "assert(editorValue.match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');" + ], + "challengeSeed":[ + "var test = (function(){", + " var testString = \"How many spaces are there in this sentance.\";", + "", + "//Do Not Modify Above", + "", + " var expression = /.+/gi;", + "", + "//Do Not Modify Below", + "", + " return(testString.match(expression).length);", + "})();(function(){return(test);})();" + ], + "challengeType":1 + }, { "id":"cf1111c1c12feddfaeb9bdef", "name":"Creating a slots machine", From 4e7c681d90e4532ddb96f078117b419f0655233f Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Sat, 1 Aug 2015 19:13:37 +0100 Subject: [PATCH 3/3] Added extra regex moving on to fix scroller without those new images --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index cd682bd51f..5a2a5a28eb 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1109,7 +1109,7 @@ "For this we will need to generate three random numbers between 1 and 5 to represent the possible values of each individual slot", "Store the three random numbers in slotOne, slotTwo and slotThree", "Generate the random numbers by using the system we used earlier in /challenges/random-whole-numbers-in-a-range", - " Math.floor(Math.random() * (5 - 1 + 1)) + 1; ." + " Math.floor(Math.random() * (5 - 1 + 1)) + 1; " ], "tests":[ "assert(typeof(runSlots($('.slot'))[0]) == 'number', 'SlotOne should be a random number');",