From 036e5a4bc7189dd6de505b036a9de04fdfad2257 Mon Sep 17 00:00:00 2001 From: Joel Bentley Date: Sun, 20 Sep 2015 15:52:54 -0400 Subject: [PATCH 1/4] Fix tests on Waypoint Mobile Responsive Images --- challenges/bootstrap.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index fb4f864474..d56663a44d 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -97,8 +97,8 @@ ], "tests": [ "assert($(\"img\").length > 1, 'You should have a total of two images.')", - "assert($(\"img\").hasClass(\"img-responsive\"), 'Your new image should have the class img-responsive.')", - "assert(new RegExp(\"http://bit.ly/fcc-running-cats\", \"gi\").test($(\"img.img-responsive\").attr(\"src\")), 'Add a second image with the src of http://bit.ly/fcc-running-cats.')" + "assert($(\"img:eq(1)\").attr(\"src\") === \"http://bit.ly/fcc-running-cats\", 'Your new image should have an src of http://bit.ly/fcc-running-cats.')", + "assert($(\"img:eq(1)\").hasClass(\"img-responsive\"), 'Your new image should have the class img-responsive.')" ], "challengeSeed": [ "", From 29069c7b9798b4c4e57ff3ac2a1bf6aca554b860 Mon Sep 17 00:00:00 2001 From: Rich Churcher Date: Mon, 21 Sep 2015 08:34:22 +1200 Subject: [PATCH 2/4] Make plain that the array is not already sorted. --- challenges/basic-bonfires.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index cbcdbd1b83..e537eda1e6 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -613,8 +613,9 @@ "title": "Where do I belong", "difficulty": "1.61", "description": [ - "Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).", - "For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (0th index), but less than 2 (1st index).", + "Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted.", + "For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (index 0), but less than 2 (index 1).", + "Likewise, where([20,3,5], 19) should return 2 because it is less than 20 (index 2) and greater than 5 (index 1).", "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "challengeSeed": [ From 32cce262515427fdd17732ebc1bd93998078240b Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 21 Sep 2015 01:55:21 +0530 Subject: [PATCH 3/4] Modify tests for Bonfire - Where do I belong close FreeCodeCamp/FreeCodeCamp#3381 --- challenges/basic-bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index 931c157ce1..c81733da04 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -617,8 +617,8 @@ "assert(where([10, 20, 30, 40, 50], 35) === 3, 'message: where([10, 20, 30, 40, 50], 35) should return 3.');", "assert(where([10, 20, 30, 40, 50], 30) === 2, 'message: where([10, 20, 30, 40, 50], 30) should return 2.');", "assert(where([40, 60], 50) === 1, 'message: where([40, 60,], 50) should return 1.');", - "assert(where([5, 3, 20, 3], 3) === 0, 'message: where([5, 3, 20, 3], 3) should return 0.');", - "assert(where([2, 20, 10], 1) === 0, 'message: where([2, 20, 10], 1) should return 0.');", + "assert(where([5, 3, 20, 3], 5) === 2, 'message: where([5, 3, 20, 3], 5) should return 2.');", + "assert(where([2, 20, 10], 19) === 2, 'message: where([2, 20, 10], 19) should return 2.');", "assert(where([2, 5, 10], 15) === 3, 'message: where([2, 5, 10], 15) should return 3.');" ], "type": "bonfire", From f39c3eabe1c9d64f3cc88d6f92b330786d4ee94f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 24 Oct 2015 01:21:01 -0700 Subject: [PATCH 4/4] remove test based on closed @saadanerdetbare PR, closes #3362 --- challenges/advanced-bonfires.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index b68dc4b0ff..04ab7c18b2 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -91,9 +91,8 @@ "tests": [ "assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 5, 4], 'message: sym([1, 2, 3], [5, 2, 1, 4]) should return [3, 5, 4].');", "assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'message: sym([1, 2, 5], [2, 3, 5], [3, 4, 5]) should return [1, 4, 5]');", - "assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'message: sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]) should return [1, 4, 5].');", - "assert.sameMembers(sym([1, 1]), [1], 'message: sym([1, 1]) should return [1].');" - ], + "assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'message: sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]) should return [1, 4, 5].');" + ], "MDNlinks": [ "Array.reduce()", "Symmetric Difference"