From bd0cb8ffdecc385b7fa20fe4ecb8062b58604dee Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Fri, 18 Sep 2015 10:37:32 +0800 Subject: [PATCH 1/9] Refactored intermediate bonfires expect to assert --- challenges/intermediate-bonfires.json | 98 +++++++++++++-------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index 88c331fd7c..fb1173440e 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -19,11 +19,11 @@ "sumAll([1, 4]);" ], "tests": [ - "expect(sumAll([1, 4])).to.be.a('Number');", - "expect(sumAll([1, 4])).to.equal(10);", - "expect(sumAll([4, 1])).to.equal(10);", - "expect(sumAll([5, 10])).to.equal(45);", - "expect(sumAll([10, 5])).to.equal(45);" + "assert(typeof(sumAll([1, 4])) === \"number\", 'The result should be a number');", + "assert.deepEqual(sumAll([1, 4]), 10, 'sumAll([1, 4]) should return 10');", + "assert.deepEqual(sumAll([4, 1]), 10, 'sumAll([4, 1]) should return 10');", + "assert.deepEqual(sumAll([5, 10]), 45, 'sumAll([5, 10]) should return 45');", + "assert.deepEqual(sumAll([10, 5]), 45, 'sumAll([10, 5]) should return 45');" ], "MDNlinks": [ "Math.max()", @@ -61,7 +61,7 @@ "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);" ], "tests": [ - "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');", + "assert(typeof(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])) === \"object\", 'The result should be an array.');", "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');", "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');", "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');", @@ -93,11 +93,11 @@ "id": "a7f4d8f2483413a6ce226cac", "title": "Roman Numeral Converter", "tests": [ - "expect(convert(12)).to.equal(\"XII\");", - "expect(convert(5)).to.equal(\"V\");", - "expect(convert(9)).to.equal(\"IX\");", - "expect(convert(29)).to.equal(\"XXIX\");", - "expect(convert(16)).to.equal(\"XVI\");" + "assert.deepEqual(convert(12), \"XII\", 'convert(12) should return \"XII\"');", + "assert.deepEqual(convert(5), \"V\", 'convert(5) should return \"V\"');", + "assert.deepEqual(convert(9), \"IX\", 'convert(9) should return \"IX\"');", + "assert.deepEqual(convert(29), \"XXIX\", 'convert(29) should return \"XXIX\"');", + "assert.deepEqual(convert(16), \"XVI\", 'convert(16) should return \"XVI\"');" ], "difficulty": "2.02", "description": [ @@ -177,11 +177,11 @@ "id": "a0b5010f579e69b815e7c5d6", "title": "Search and Replace", "tests": [ - "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", - "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");", - "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");", - "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");", - "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");" + "assert.deepEqual(replace(\"Let us go to the store\", \"store\", \"mall\"), \"Let us go to the mall\", 'replace(\"Let us go to the store\", \"store\", \"mall\") should return \"Let us go to the mall\"');", + "assert.deepEqual(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\"), \"He is Sitting on the couch\", 'replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\") should return \"He is Sitting on the couch\"');", + "assert.deepEqual(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\"), \"This has a spelling error\", 'replace(\"This has a spellngi error\", \"spellingi\", \"spelling\") should return \"This has a spelling error\"');", + "assert.deepEqual(replace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", 'replace(\"His name is Tom\", \"Tom\", \"john\") should return \"His name is John\"');", + "assert.deepEqual(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\"), \"Let us get back to more Bonfires\", 'replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\") should return \"Let us get back to more Bonfires\"');" ], "difficulty": "2.035", "description": [ @@ -221,11 +221,11 @@ "id": "aa7697ea2477d1316795783b", "title": "Pig Latin", "tests": [ - "expect(translate(\"california\")).to.equal(\"aliforniacay\");", - "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");", - "expect(translate(\"glove\")).to.equal(\"oveglay\");", - "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");", - "expect(translate(\"eight\")).to.equal(\"eightway\");" + "assert.deepEqual(translate(\"california\"), \"aliforniacay\", 'translate(\"california\") should return \"aliforniacay\"');", + "assert.deepEqual(translate(\"paragraphs\"), \"aragraphspay\", 'translate(\"paragraphs\") should return \"aragraphspay\"');", + "assert.deepEqual(translate(\"glove\"), \"oveglay\", 'translate(\"glove\") should return \"oveglay\"');", + "assert.deepEqual(translate(\"algorithm\"), \"algorithmway\", 'translate(\"algorithm\") should return \"algorithmway\"');", + "assert.deepEqual(translate(\"eight\"), \"eightway\", 'translate(\"eight\") should return \"eightway\"');" ], "difficulty": "2.04", "description": [ @@ -319,10 +319,10 @@ "fearNotLetter('abce');" ], "tests": [ - "expect(fearNotLetter('abce')).to.equal('d');", - "expect(fearNotLetter('bcd')).to.be.undefined;", - "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');", - "expect(fearNotLetter('yz')).to.be.undefined;" + "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'fearNotLetter(\"abce\") should return d');", + "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'fearNotLetter(\"abcdefghjklmno\") should return i');", + "assert.isUndefined(fearNotLetter(\"bcd\"), 'fearNotLetter(\"bcd\") should return undefined');", + "assert.isUndefined(fearNotLetter(\"yz\"), 'fearNotLetter(\"yz\") should return undefined');" ], "MDNlinks": [ "String.charCodeAt()", @@ -525,12 +525,12 @@ "sumFibs(4);" ], "tests": [ - "expect(sumFibs(1)).to.be.a('number');", - "expect(sumFibs(1000)).to.equal(1785);", - "expect(sumFibs(4000000)).to.equal(4613732);", - "expect(sumFibs(4)).to.equal(5);", - "expect(sumFibs(75024)).to.equal(60696);", - "expect(sumFibs(75025)).to.equal(135721);" + "assert.deepEqual(typeof(sumFibs(1)), \"number\", \"The result should be a number\");", + "assert.deepEqual(sumFibs(1000), 1785, 'sumFibs(1000) should return 1785');", + "assert.deepEqual(sumFibs(4000000), 4613732, 'sumFibs(4000000) should return 4613732');", + "assert.deepEqual(sumFibs(4), 5, 'sumFibs(4) should return 5');", + "assert.deepEqual(sumFibs(75024), 60696, 'sumFibs(75024) should return 60696');", + "assert.deepEqual(sumFibs(75025), 135721, 'sumFibs(75025) should return 135721');" ], "MDNlinks": [ "Remainder" @@ -566,9 +566,9 @@ "sumPrimes(10);" ], "tests": [ - "expect(sumPrimes(10)).to.be.a('number');", - "expect(sumPrimes(10)).to.equal(17);", - "expect(sumPrimes(977)).to.equal(73156);" + "assert.deepEqual(typeof(sumPrimes(10)), \"number\", \"The result should be a number\");", + "assert.deepEqual(sumPrimes(10), 17, 'sumPrimes(10) should return 17');", + "assert.deepEqual(sumPrimes(977), 73156, 'sumPrimes(977) should return 73156');" ], "MDNlinks": [ "For Loops", @@ -606,10 +606,10 @@ "smallestCommons([1,5]);" ], "tests": [ - "expect(smallestCommons([1,5])).to.be.a('number');", - "expect(smallestCommons([1,5])).to.equal(60);", - "expect(smallestCommons([5,1])).to.equal(60);", - "expect(smallestCommons([1,13])).to.equal(360360);" + "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", \"The result should be a number\");", + "assert.deepEqual(smallestCommons([1, 5]), 60, 'smallestCommons([1, 5]) should return 60');", + "assert.deepEqual(smallestCommons([5, 1]), 60, 'smallestCommons([5, 1]) should return 60');", + "assert.deepEqual(smallestCommons([1, 13]), 360360, 'smallestCommons([1, 13]) should return 360360');" ], "MDNlinks": [ "Smallest Common Multiple" @@ -680,10 +680,10 @@ "drop([1, 2, 3], function(n) {return n < 3; });" ], "tests": [ - "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);", - "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);", - "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);", - "expect(drop([1, 2, 3, 7, 4], function(n) { return n > 5; })).to.eqls([7, 4]);" + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4]');", + "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3]');", + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'drop([1, 2, 3, 4], function(n) {return n > 5;}) should return []');", + "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4]');" ], "MDNlinks": [ "Arguments object", @@ -757,8 +757,8 @@ "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');" ], "tests": [ - "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");", - "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");" + "assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), \"Aren't bonfires fun!?\", \"binaryAgent() should return Aren't bonfires fun!?\");", + "assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), \"I love FreeCodeCamp!\", 'binaryAgent() should return \"I love FreeCodeCamp!\"');" ], "MDNlinks": [ "String.charCodeAt()", @@ -838,11 +838,11 @@ "add(2,3);" ], "tests": [ - "expect(add(2, 3)).to.equal(5);", - "expect(add(2)(3)).to.equal(5);", - "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;", - "expect(add(2, '3')).to.be.undefined;", - "expect(add(2)([3])).to.be.undefined;" + "assert.deepEqual(add(2, 3), 5, 'add(2, 3) should return 5');", + "assert.deepEqual(add(2)(3), 5, 'add(2)(3) should return 5');", + "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'add(\"http://bit.ly/IqT6zt\") should return undefined');", + "assert.isUndefined(add(2, \"3\"), 'add(2, \"3\") should return undefined');", + "assert.isUndefined(add(2)([3]), 'add(2)([3]) should return undefined');" ], "MDNlinks": [ "Global Function Object", From 0610ea46f6fc654b16fb3f98e32cb53eeb2d3b41 Mon Sep 17 00:00:00 2001 From: Arsen Melikyan Date: Sun, 20 Sep 2015 01:08:05 +0400 Subject: [PATCH 2/9] fixes a test in a bonfire --- challenges/basic-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index cbcdbd1b83..df356f9034 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -234,7 +234,7 @@ ], "tests": [ "assert(typeof(titleCase(\"I'm a little tea pot\")) === \"string\", 'titleCase() should return a string.');", - "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", '\"I'm a little tea pot\" should return \"I'm A Little Tea Pot\".');", + "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", '\"I'm a little tea pot\" should return \"I'm A Little Tea Pot\".');", "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", '\"sHoRt AnD sToUt\" should return \"Short And Stout\".');", "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", '\"HERE IS MY HANDLE HERE IS MY SPOUT\" should return \"Here Is My Handle Here Is My Spout\"');" ], From c5df8568a5c2d9b73c22a4193ab13712513e3b3c Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Wed, 23 Sep 2015 16:27:42 +0800 Subject: [PATCH 3/9] Renamed zipline for consistency Renamed the 'Wikipedia Viewer' ziplines to 'Build a Wikipedia Viewer' to make it consistent with the other zipline names. --- challenges/intermediate-ziplines.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-ziplines.json b/challenges/intermediate-ziplines.json index ae92f3879d..c119db33af 100644 --- a/challenges/intermediate-ziplines.json +++ b/challenges/intermediate-ziplines.json @@ -37,7 +37,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd19", - "title": "Wikipedia Viewer", + "title": "Build a Wikipedia Viewer", "difficulty": 1.03, "challengeSeed": ["126415131"], "description": [ From 441924cbaa9b0f0c20756631eeb39cb9ef8a5cc9 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Tue, 22 Sep 2015 00:22:02 -0700 Subject: [PATCH 4/9] 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 5/9] 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 6/9] 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 86c07dcd979169669e26c83100944080cb047eb3 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 28 Sep 2015 01:04:59 +0530 Subject: [PATCH 7/9] Correct comment Replace "ourArray[1]" with "ourArray" close FreeCodeCamp/FreeCodeCamp#3515 --- 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 e3542ee41d..e0b38cc841 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -520,7 +520,7 @@ "challengeSeed":[ "var ourArray = [1,2,3];", "ourArray[1] = 3;", - "// ourArray[1] now equals [1,3,3].", + "// ourArray now equals [1,3,3].", "var myArray = [1,2,3];", "// Only change code below this line.", "", From b5141f50aeb4e8181c3de161c90c8b5fa3f4e528 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 28 Sep 2015 03:45:13 +0530 Subject: [PATCH 8/9] 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 9/9] 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.')" ],