From 441924cbaa9b0f0c20756631eeb39cb9ef8a5cc9 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Tue, 22 Sep 2015 00:22:02 -0700 Subject: [PATCH 1/5] add note about how jQuery is zero-indexed for clarification --- challenges/jquery.json | 1 + 1 file changed, 1 insertion(+) diff --git a/challenges/jquery.json b/challenges/jquery.json index 3a7b988816..95214991e4 100644 --- a/challenges/jquery.json +++ b/challenges/jquery.json @@ -791,6 +791,7 @@ "description": [ "You can also target all the even-numbered elements.", "Here's how you would target all the odd-numbered elements with class target and give them classes: $(\".target:odd\").addClass(\"animated shake\");", + "Note that jQuery is zero-indexed, meaning that, counter-intuitively, :odd selects the second element, fourth element, and so on.", "Try selecting all the even-numbered elements - that is, what your browser will consider even-numbered elements - and giving them the classes of animated and shake." ], "tests": [ From e8a96b8d42dc97c1ff54e2f4d66e591278568492 Mon Sep 17 00:00:00 2001 From: Aayush Kapoor Date: Sat, 26 Sep 2015 16:01:46 +0530 Subject: [PATCH 2/5] Edit last test case for Bonfire: Where art thou --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index d804919dfd..ab74b6cab8 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -153,7 +153,7 @@ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", - "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" + "assert.deepEqual(where([{ 'a': 5 }, { 'b': 10 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ], "MDNlinks": [ "Global Object", From 8394ded6d1a716ea3ece87e322c5c67e31b88917 Mon Sep 17 00:00:00 2001 From: natac13 Date: Sat, 26 Sep 2015 11:17:49 -0400 Subject: [PATCH 3/5] fixed typo in test closes #3505 --- challenges/basic-bonfires.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index df356f9034..34c4c809ad 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -464,9 +464,9 @@ "slasher([1, 2, 3], 2, \"\");" ], "tests": [ - "assert.deepEqual(slasher([1, 2, 3], 2), [3], '[1, 2, 3], 2, [3] should return [3].');", - "assert.deepEqual(slasher([1, 2, 3], 0), [1, 2, 3], '[1, 2, 3], 0 should return [1, 2, 3].');", - "assert.deepEqual(slasher([1, 2, 3], 9), [], '[1, 2, 3], 9 should return [].');" + "assert.deepEqual(slasher([1, 2, 3], 2), [3], 'slasher([1, 2, 3], 2) should return [3].');", + "assert.deepEqual(slasher([1, 2, 3], 0), [1, 2, 3], 'slasher([1, 2, 3], 0) should return [1, 2, 3].');", + "assert.deepEqual(slasher([1, 2, 3], 9), [], 'slasher([1, 2, 3], 9) should return [].');" ], "MDNlinks": [ "Array.slice()", From b5141f50aeb4e8181c3de161c90c8b5fa3f4e528 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 28 Sep 2015 03:45:13 +0530 Subject: [PATCH 4/5] Fix comments in Waypoint: Manipulate Arrays With unshift --- challenges/basic-javascript.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index e3542ee41d..8e396d3ec9 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -643,8 +643,9 @@ "challengeSeed": [ "var ourArray = [\"Stimpson\", \"J\", [\"cat\"]];", "ourArray.shift();", - "// ourArray now equals [\"happy\", \"J\", [\"cat\"]]", + "// ourArray now equals [\"J\", [\"cat\"]]", "ourArray.unshift(\"happy\");", + "// ourArray now equals [\"happy\", \"J\", [\"cat\"]]", "", "var myArray = [\"John\", 23, [\"dog\", 3]];", "myArray.shift();", From 10ba213b93b3ff4c4d0527a6230119b02634f84e Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Mon, 21 Sep 2015 22:01:10 +0800 Subject: [PATCH 5/5] Add test HTML5 waypoint to make it stricter - Added a test to the "Nest an Anchor Element within a Paragraph" waypoint. The text 'View more' must now be outside the tags. --- challenges/html5-and-css.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index 051b6764c7..d865ce2d56 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -1142,7 +1142,8 @@ "assert($(\"a\").text().match(/cat\\sphotos/gi), 'Your a element should have the anchor text of \"cat photos\"')", "assert($(\"p\") && $(\"p\").length > 2, 'Create a new p element around your a element.')", "assert($(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().is(\"p\"), 'Your a element should be nested within your new p element.')", - "assert($(\"p\").text().match(/View\\smore/gi), 'Your p element should have the text \"View more\".')", + "assert($(\"p\").text().match(/^View\\smore\\s/gi), 'Your p element should have the text \"View more \" (with a space after it).')", + "assert(!$(\"a\").text().match(/View\\smore/gi), 'Your a element should not have the text \"View more\".')", "assert(editor.match(/<\\/p>/g) && editor.match(/

/g).length === editor.match(/

p elements has a closing tag.')", "assert(editor.match(/<\\/a>/g) && editor.match(//g).length === editor.match(/a elements has a closing tag.')" ],