diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md index e3a86f0535..66fda2737d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md @@ -30,7 +30,7 @@ tests: - text: Your code should have 6 h3 closing tags. testString: assert((code.match(/\/h3/g) || []).length===6); - text: Your code should not have any h5 tags. - testString: assert($("h5").length === 0, "Your code should not have any h5 tags."); + testString: assert($("h5").length === 0); - text: Your code should not have any h5 closing tags. testString: assert(/\/h5/.test(code)===false); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md index eb6c2088e4..fe3689fa72 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md @@ -33,7 +33,7 @@ tests: - text: Your div element should have a silver background. testString: assert($("div").css("background-color") === "rgb(192, 192, 192)"); - text: Define a class named silver-background within the style element and assign the value of silver to the background-color property. - testString: assert(code.match(/\.silver-background\s*{\s*background-color:\s*silver;\s*}/), "Define a class named silver-background within the style element and assign the value of silver to the background-color property."); + testString: assert(code.match(/\.silver-background\s*{\s*background-color:\s*silver;\s*}/)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md index 3c26174d95..73f578cd76 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md @@ -32,7 +32,7 @@ tests: - text: Your h2 element should use the font Lobster. testString: assert($("h2").css("font-family").match(/lobster/i)); - text: Use an h2 CSS selector to change the font. - testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?(.{0,})\s*;\s*\}/gi.test(code), "Use an h2 CSS selector to change the font.");' + testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?(.{0,})\s*;\s*\}/gi.test(code));' - text: Your p element should still use the font monospace. testString: assert($("p").css("font-family").match(/monospace/i)); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.english.md index 41db2c1dee..94131cb4ed 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-prototype-chain.english.md @@ -46,7 +46,7 @@ Modify the code to show the correct prototype chain. ```yml tests: - text: Your code should show that Object.prototype is the prototype of Dog.prototype - testString: assert(/Object\.prototype\.isPrototypeOf/.test(code), "Your code should show that Object.prototype is the prototype of Dog.prototype"); + testString: assert(/Object\.prototype\.isPrototypeOf/.test(code)); ``` diff --git a/curriculum/challenges/english/03-front-end-libraries/jquery/learn-how-script-tags-and-document-ready-work.english.md b/curriculum/challenges/english/03-front-end-libraries/jquery/learn-how-script-tags-and-document-ready-work.english.md index 6eb8e13e4c..bb0046d5fb 100644 --- a/curriculum/challenges/english/03-front-end-libraries/jquery/learn-how-script-tags-and-document-ready-work.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/jquery/learn-how-script-tags-and-document-ready-work.english.md @@ -26,11 +26,11 @@ This is important because without your document ready function, you ```yml tests: - text: Create a script element making sure it is valid and has a closing tag. - testString: 'assert(code.match(/<\/script\s*>/g) && code.match(//g) && code.match(/<\/script\s*>/g).length === code.match(//g).length, "Create a script element making sure it is valid and has a closing tag.");' + testString: 'assert(code.match(/<\/script\s*>/g) && code.match(//g) && code.match(/<\/script\s*>/g).length === code.match(//g).length);' - text: 'You should add $(document).ready(function() { to the beginning of your script element.' - testString: 'assert(code.match(/\$\s*?\(\s*?document\s*?\)\.ready\s*?\(\s*?function\s*?\(\s*?\)\s*?\{/g), "You should add $(document).ready(function() { to the beginning of your script element.");' + testString: 'assert(code.match(/\$\s*?\(\s*?document\s*?\)\.ready\s*?\(\s*?function\s*?\(\s*?\)\s*?\{/g));' - text: 'Close your $(document).ready(function() { function with });' - testString: 'assert(code.match(/\n*?\s*?\}\s*?\);/g), "Close your $(document).ready(function() { function with });");' + testString: 'assert(code.match(/\n*?\s*?\}\s*?\);/g));' ``` diff --git a/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md b/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md index 4fc84f943e..79b34cbd57 100644 --- a/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md @@ -27,9 +27,9 @@ Note that we've already included both the jQuery library and the Animate.css lib ```yml tests: - text: 'Use the jQuery addClass() function to give the classes animated and bounce to your button elements.' - testString: 'assert($("button").hasClass("animated") && $("button").hasClass("bounce"), "Use the jQuery addClass() function to give the classes animated and bounce to your button elements.");' + testString: 'assert($("button").hasClass("animated") && $("button").hasClass("bounce"));' - text: Only use jQuery to add these classes to the element. - testString: 'assert(!code.match(/class.*animated/g), "Only use jQuery to add these classes to the element.");' + testString: 'assert(!code.match(/class.*animated/g));' - text: Your jQuery code should be within the $(document).ready(); function. testString: assert(code.match(/\$\(document\)\.ready\(function.*(\s|\n)*.*button.*.addClass.*\);/g), 'Your jQuery code should be within the $(document).ready(); function.'); diff --git a/curriculum/challenges/english/03-front-end-libraries/jquery/target-the-same-element-with-multiple-jquery-selectors.english.md b/curriculum/challenges/english/03-front-end-libraries/jquery/target-the-same-element-with-multiple-jquery-selectors.english.md index 2021dcef29..e8d72c3f6c 100644 --- a/curriculum/challenges/english/03-front-end-libraries/jquery/target-the-same-element-with-multiple-jquery-selectors.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/jquery/target-the-same-element-with-multiple-jquery-selectors.english.md @@ -38,7 +38,7 @@ tests: - text: Your #target1 element should have the classes animatedshake and btn-primary. testString: assert($('#target1').hasClass('animated') && $('#target1').hasClass('shake') && $('#target1').hasClass('btn-primary'), 'Your #target1 element should have the classes animatedshake and btn-primary.'); - text: Only use jQuery to add these classes to the element. - testString: 'assert(!code.match(/class.*animated/g), "Only use jQuery to add these classes to the element.");' + testString: 'assert(!code.match(/class.*animated/g));' ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-and-add-to-sets-in-es6.english.md b/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-and-add-to-sets-in-es6.english.md index dc7bbe6dd6..b21ff63b3e 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-and-add-to-sets-in-es6.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/data-structures/create-and-add-to-sets-in-es6.english.md @@ -40,7 +40,7 @@ For this exercise, return a set with the following values: 1, 2, 3, 'Taco' ```yml tests: - text: 'Your Set should only contain the values 1, 2, 3, Taco, Cat, Awesome.' - testString: 'assert((function(){var test = checkSet(); return (test.size == 6) && test.has(1) && test.has(2) && test.has(3) && test.has("Taco") && test.has("Cat") && test.has("Awesome");})(), "Your Set should only contain the values 1, 2, 3, Taco, Cat, Awesome.");' + testString: 'assert((function(){var test = checkSet(); return (test.size == 6) && test.has(1) && test.has(2) && test.has(3) && test.has("Taco") && test.has("Cat") && test.has("Awesome");})());' ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/data-structures/perform-a-subset-check-on-two-sets-of-data.english.md b/curriculum/challenges/english/08-coding-interview-prep/data-structures/perform-a-subset-check-on-two-sets-of-data.english.md index ea459fc547..3261c7e0ed 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/data-structures/perform-a-subset-check-on-two-sets-of-data.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/data-structures/perform-a-subset-check-on-two-sets-of-data.english.md @@ -25,13 +25,13 @@ tests: - text: The first Set() was contained in the second Set testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setB.add('b'); setB.add('c'); setB.add('a'); setB.add('d'); var subsetSetAB = setA.subset(setB);return (subsetSetAB === true)})(), 'The first Set() was contained in the second Set'); - text: ['a', 'b'].subset(['a', 'b', 'c', 'd']) should return true - testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setB.add('a'); setB.add('b'); setB.add('c'); setB.add('d'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === true)})(), "['a', 'b'].subset(['a', 'b', 'c', 'd']) should return true"); + testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setB.add('a'); setB.add('b'); setB.add('c'); setB.add('d'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === true)})()); - text: ['a', 'b', 'c'].subset(['a', 'b']) should return false - testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setA.add('c'); setB.add('a'); setB.add('b'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === false)})(), "['a', 'b', 'c'].subset(['a', 'b']) should return false"); + testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setA.add('c'); setB.add('a'); setB.add('b'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === false)})()); - text: [].subset([]) should return true testString: assert((function(){var setA = new Set(); var setB = new Set(); var subsetSetAB = setA.subset(setB); return (subsetSetAB === true)})(), '[].subset([]) should return true'); - text: ['a', 'b'].subset(['c', 'd']) should return false - testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setB.add('c'); setB.add('d'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === false)})(), "['a', 'b'].subset(['c', 'd']) should return false"); + testString: assert((function(){var setA = new Set(); var setB = new Set(); setA.add('a'); setA.add('b'); setB.add('c'); setB.add('d'); var subsetSetAB = setA.subset(setB); return (subsetSetAB === false)})()); ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-.has-and-.size-on-an-es6-set.english.md b/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-.has-and-.size-on-an-es6-set.english.md index 771c16c0ca..cb56a71285 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-.has-and-.size-on-an-es6-set.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-.has-and-.size-on-an-es6-set.english.md @@ -26,7 +26,7 @@ In this exercise we will pass an array and a value to the checkSet() function. Y ```yml tests: - text: checkSet([4, 5, 6], 3) should return [ false, 3 ] - testString: 'assert((function(){var test = checkSet([4,5,6], 3); return DeepEqual(test, [ false, 3 ]);})(), "checkSet([4, 5, 6], 3) should return [ false, 3 ]");' + testString: 'assert((function(){var test = checkSet([4,5,6], 3); return DeepEqual(test, [ false, 3 ]);})());' ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-spread-and-notes-for-es5-set-integration.english.md b/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-spread-and-notes-for-es5-set-integration.english.md index e6f040f8c6..56bce4b2c7 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-spread-and-notes-for-es5-set-integration.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/data-structures/use-spread-and-notes-for-es5-set-integration.english.md @@ -30,7 +30,7 @@ Now you've successfully learned how to use the ES6 Set() object, go ```yml tests: - text: Your Set was returned correctly! - testString: 'assert((function(){var test = checkSet(new Set([1,2,3,4,5,6,7])); return DeepEqual(test, [ 1, 2, 3, 4, 5, 6, 7 ]);})(), "Your Set was returned correctly!");' + testString: 'assert((function(){var test = checkSet(new Set([1,2,3,4,5,6,7])); return DeepEqual(test, [ 1, 2, 3, 4, 5, 6, 7 ]);})());' ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/factorial.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/factorial.english.md index 0228b59e1e..c6207c3a53 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/factorial.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/factorial.english.md @@ -34,11 +34,11 @@ tests: - text: factorial(2) should return a number. testString: assert(typeof factorial(2) === 'number', 'factorial(2) should return a number.'); - text: factorial(3) should return 6. - testString: assert.equal(factorial(3),results[0],"factorial(3) should return 6."); + testString: assert.equal(factorial(3),results[0]); - text: factorial(3) should return 120. - testString: assert.equal(factorial(5),results[1],"factorial(3) should return 120."); + testString: assert.equal(factorial(5),results[1]); - text: factorial(3) should return 3,628,800. - testString: assert.equal(factorial(10),results[2],"factorial(3) should return 3,628,800."); + testString: assert.equal(factorial(10),results[2]); ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/fibonacci-sequence.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/fibonacci-sequence.english.md index a781e15c7c..ec95632881 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/fibonacci-sequence.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/fibonacci-sequence.english.md @@ -28,11 +28,11 @@ tests: - text: fibonacci(2) should return a number. testString: assert(typeof fibonacci(2) == 'number', 'fibonacci(2) should return a number.'); - text: fibonacci(3) should return 1. - testString: assert.equal(fibonacci(3),1,"fibonacci(3) should return 1."); + testString: assert.equal(fibonacci(3),1); - text: fibonacci(5) should return 3. - testString: assert.equal(fibonacci(5),3,"fibonacci(5) should return 3."); + testString: assert.equal(fibonacci(5),3); - text: fibonacci(10) should return 34. - testString: assert.equal(fibonacci(10),34,"fibonacci(10) should return 34."); + testString: assert.equal(fibonacci(10),34); ``` diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/sedols.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/sedols.english.md index 4504778225..4c368ffd9e 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/sedols.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/sedols.english.md @@ -38,13 +38,13 @@ tests: - text: sedol is a function. testString: assert(typeof sedol === 'function', 'sedol is a function.'); - text: sedol('a') should return null. - testString: assert(sedol('a') === null, "sedol('a') should return null."); + testString: assert(sedol('a') === null); - text: sedol('710889') should return '7108899'. - testString: assert(sedol('710889') === '7108899', "sedol('710889') should return '7108899'."); + testString: assert(sedol('710889') === '7108899'); - text: sedol('BOATER') should return null. - testString: assert(sedol('BOATER') === null, "sedol('BOATER') should return null."); + testString: assert(sedol('BOATER') === null); - text: sedol('228276') should return '2282765'. - testString: assert(sedol('228276') === '2282765', "sedol('228276') should return '2282765'."); + testString: assert(sedol('228276') === '2282765'); ```