Merge pull request #2 from Bouncey/fix/testFormatting
Correct test formatting
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
1f5abb3dde
commit
c72e1fdd5f
@ -17,8 +17,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.'",
|
||||
"testString": "assert($('img').attr('alt'), 'Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.')"
|
||||
"text": "Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.",
|
||||
"testString": "assert($('img').attr('alt'), 'Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -55,12 +55,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have an <code>alt</code> attribute.'",
|
||||
"testString": "assert(!($('img').attr('alt') == undefined), 'Your <code>img</code> tag should have an <code>alt</code> attribute.')"
|
||||
"text": "Your <code>img</code> tag should have an <code>alt</code> attribute.",
|
||||
"testString": "assert(!($('img').attr('alt') == undefined), 'Your <code>img</code> tag should have an <code>alt</code> attribute.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>alt</code> attribute should be set to an empty string.'",
|
||||
"testString": "assert($('img').attr('alt') == '', 'The <code>alt</code> attribute should be set to an empty string.')"
|
||||
"text": "The <code>alt</code> attribute should be set to an empty string.",
|
||||
"testString": "assert($('img').attr('alt') == '', 'The <code>alt</code> attribute should be set to an empty string.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -108,12 +108,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have six <code>h3</code> tags.'",
|
||||
"testString": "assert($('h3').length === 6, 'Your code should have six <code>h3</code> tags.')"
|
||||
"text": "Your code should have six <code>h3</code> tags.",
|
||||
"testString": "assert($('h3').length === 6, 'Your code should have six <code>h3</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>h5</code> tags.'",
|
||||
"testString": "assert($('h5').length === 0, 'Your code should not have any <code>h5</code> tags.')"
|
||||
"text": "Your code should not have any <code>h5</code> tags.",
|
||||
"testString": "assert($('h5').length === 0, 'Your code should not have any <code>h5</code> tags.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -163,12 +163,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>main</code> tag.'",
|
||||
"testString": "assert($('main').length == 1, 'Your code should have one <code>main</code> tag.')"
|
||||
"text": "Your code should have one <code>main</code> tag.",
|
||||
"testString": "assert($('main').length == 1, 'Your code should have one <code>main</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.'",
|
||||
"testString": "assert(code.match(/<\\/header>\\s*?<main>\\s*?<\\/main>/gi), 'The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.')"
|
||||
"text": "The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.",
|
||||
"testString": "assert(code.match(/<\\/header>\\s*?<main>\\s*?<\\/main>/gi), 'The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -210,12 +210,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have three <code>article</code> tags.'",
|
||||
"testString": "assert($('article').length == 3, 'Your code should have three <code>article</code> tags.')"
|
||||
"text": "Your code should have three <code>article</code> tags.",
|
||||
"testString": "assert($('article').length == 3, 'Your code should have three <code>article</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -269,20 +269,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>header</code> tag.'",
|
||||
"testString": "assert($('header').length == 1, 'Your code should have one <code>header</code> tag.')"
|
||||
"text": "Your code should have one <code>header</code> tag.",
|
||||
"testString": "assert($('header').length == 1, 'Your code should have one <code>header</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>header</code> tags should wrap around the <code>h1</code>.'",
|
||||
"testString": "assert($('header').children('h1').length == 1, 'Your <code>header</code> tags should wrap around the <code>h1</code>.')"
|
||||
"text": "Your <code>header</code> tags should wrap around the <code>h1</code>.",
|
||||
"testString": "assert($('header').children('h1').length == 1, 'Your <code>header</code> tags should wrap around the <code>h1</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>header</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/header>/g) && code.match(/<\\/header>/g).length === code.match(/<header>/g).length, 'Make sure your <code>header</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>header</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/header>/g) && code.match(/<\\/header>/g).length === code.match(/<header>/g).length, 'Make sure your <code>header</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -339,20 +339,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>nav</code> tag.'",
|
||||
"testString": "assert($('nav').length == 1, 'Your code should have one <code>nav</code> tag.')"
|
||||
"text": "Your code should have one <code>nav</code> tag.",
|
||||
"testString": "assert($('nav').length == 1, 'Your code should have one <code>nav</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>nav</code> tags should wrap around the <code>ul</code> and its list items.'",
|
||||
"testString": "assert($('nav').children('ul').length == 1, 'Your <code>nav</code> tags should wrap around the <code>ul</code> and its list items.')"
|
||||
"text": "Your <code>nav</code> tags should wrap around the <code>ul</code> and its list items.",
|
||||
"testString": "assert($('nav').children('ul').length == 1, 'Your <code>nav</code> tags should wrap around the <code>ul</code> and its list items.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>nav</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/nav>/g) && code.match(/<\\/nav>/g).length === code.match(/<nav>/g).length, 'Make sure your <code>nav</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>nav</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/nav>/g) && code.match(/<\\/nav>/g).length === code.match(/<nav>/g).length, 'Make sure your <code>nav</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -414,20 +414,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>footer</code> tag.'",
|
||||
"testString": "assert($('footer').length == 1, 'Your code should have one <code>footer</code> tag.')"
|
||||
"text": "Your code should have one <code>footer</code> tag.",
|
||||
"testString": "assert($('footer').length == 1, 'Your code should have one <code>footer</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should have an opening and closing <code>footer</code> tag.'",
|
||||
"testString": "assert(code.match(/<footer>\\s*© 2016 Camper Cat\\s*<\\/footer>/g), 'Your code should have an opening and closing <code>footer</code> tag.')"
|
||||
"text": "Your code should have an opening and closing <code>footer</code> tag.",
|
||||
"testString": "assert(code.match(/<footer>\\s*© 2016 Camper Cat\\s*<\\/footer>/g), 'Your code should have an opening and closing <code>footer</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -497,32 +497,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>audio</code> tag.'",
|
||||
"testString": "assert($('audio').length === 1, 'Your code should have one <code>audio</code> tag.')"
|
||||
"text": "Your code should have one <code>audio</code> tag.",
|
||||
"testString": "assert($('audio').length === 1, 'Your code should have one <code>audio</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>audio</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/audio>/g) && code.match(/<audio controls>/g) && code.match(/<\\/audio>/g).length === code.match(/<audio controls>/g).length, 'Make sure your <code>audio</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>audio</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/audio>/g) && code.match(/<audio controls>/g) && code.match(/<\\/audio>/g).length === code.match(/<audio controls>/g).length, 'Make sure your <code>audio</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>audio</code> tag should have the <code>controls</code> attribute.'",
|
||||
"testString": "assert($('audio').attr('controls'), 'The <code>audio</code> tag should have the <code>controls</code> attribute.')"
|
||||
"text": "The <code>audio</code> tag should have the <code>controls</code> attribute.",
|
||||
"testString": "assert($('audio').attr('controls'), 'The <code>audio</code> tag should have the <code>controls</code> attribute.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should have one <code>source</code> tag.'",
|
||||
"testString": "assert($('source').length === 1, 'Your code should have one <code>source</code> tag.')"
|
||||
"text": "Your code should have one <code>source</code> tag.",
|
||||
"testString": "assert($('source').length === 1, 'Your code should have one <code>source</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>source</code> tag should be inside the <code>audio</code> tags.'",
|
||||
"testString": "assert($('audio').children('source').length === 1, 'Your <code>source</code> tag should be inside the <code>audio</code> tags.')"
|
||||
"text": "Your <code>source</code> tag should be inside the <code>audio</code> tags.",
|
||||
"testString": "assert($('audio').children('source').length === 1, 'Your <code>source</code> tag should be inside the <code>audio</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.'",
|
||||
"testString": "assert($('source').attr('src') === 'https://s3.amazonaws.com/freecodecamp/screen-reader.mp3', 'The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.')"
|
||||
"text": "The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.",
|
||||
"testString": "assert($('source').attr('src') === 'https://s3.amazonaws.com/freecodecamp/screen-reader.mp3', 'The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.'",
|
||||
"testString": "assert($('source').attr('type') === 'audio/mpeg', 'Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.')"
|
||||
"text": "Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.",
|
||||
"testString": "assert($('source').attr('type') === 'audio/mpeg', 'Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -567,28 +567,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have one <code>figure</code> tag.'",
|
||||
"testString": "assert($('figure').length == 1, 'Your code should have one <code>figure</code> tag.')"
|
||||
"text": "Your code should have one <code>figure</code> tag.",
|
||||
"testString": "assert($('figure').length == 1, 'Your code should have one <code>figure</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should have one <code>figcaption</code> tag.'",
|
||||
"testString": "assert($('figcaption').length == 1, 'Your code should have one <code>figcaption</code> tag.')"
|
||||
"text": "Your code should have one <code>figcaption</code> tag.",
|
||||
"testString": "assert($('figcaption').length == 1, 'Your code should have one <code>figcaption</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>p</code> tags.'",
|
||||
"testString": "assert($('p').length == 0, 'Your code should not have any <code>p</code> tags.')"
|
||||
"text": "Your code should not have any <code>p</code> tags.",
|
||||
"testString": "assert($('p').length == 0, 'Your code should not have any <code>p</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>figcaption</code> should be a child of the <code>figure</code> tag.'",
|
||||
"testString": "assert($('figure').children('figcaption').length == 1, 'The <code>figcaption</code> should be a child of the <code>figure</code> tag.')"
|
||||
"text": "The <code>figcaption</code> should be a child of the <code>figure</code> tag.",
|
||||
"testString": "assert($('figure').children('figcaption').length == 1, 'The <code>figcaption</code> should be a child of the <code>figure</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>figure</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/figure>/g) && code.match(/<\\/figure>/g).length === code.match(/<figure>/g).length, 'Make sure your <code>figure</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>figure</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/figure>/g) && code.match(/<\\/figure>/g).length === code.match(/<figure>/g).length, 'Make sure your <code>figure</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -664,12 +664,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.'",
|
||||
"testString": "assert($('label').attr('for'), 'Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.')"
|
||||
"text": "Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.",
|
||||
"testString": "assert($('label').attr('for'), 'Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.'",
|
||||
"testString": "assert($('label').attr('for') == 'email', 'Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.')"
|
||||
"text": "Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.",
|
||||
"testString": "assert($('label').attr('for') == 'email', 'Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -736,24 +736,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should have a <code>fieldset</code> tag around the radio button set.'",
|
||||
"testString": "assert($('fieldset').length == 1, 'Your code should have a <code>fieldset</code> tag around the radio button set.')"
|
||||
"text": "Your code should have a <code>fieldset</code> tag around the radio button set.",
|
||||
"testString": "assert($('fieldset').length == 1, 'Your code should have a <code>fieldset</code> tag around the radio button set.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>fieldset</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/fieldset>/g) && code.match(/<\\/fieldset>/g).length === code.match(/<fieldset>/g).length, 'Make sure your <code>fieldset</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>fieldset</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/fieldset>/g) && code.match(/<\\/fieldset>/g).length === code.match(/<fieldset>/g).length, 'Make sure your <code>fieldset</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should have a <code>legend</code> tag around the text asking what level ninja a user is.'",
|
||||
"testString": "assert($('legend').length == 1, 'Your code should have a <code>legend</code> tag around the text asking what level ninja a user is.')"
|
||||
"text": "Your code should have a <code>legend</code> tag around the text asking what level ninja a user is.",
|
||||
"testString": "assert($('legend').length == 1, 'Your code should have a <code>legend</code> tag around the text asking what level ninja a user is.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not have any <code>div</code> tags.'",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.')"
|
||||
"text": "Your code should not have any <code>div</code> tags.",
|
||||
"testString": "assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should no longer have a <code>p</code> tag around the text asking what level ninja a user is.'",
|
||||
"testString": "assert($('p').length == 4, 'Your code should no longer have a <code>p</code> tag around the text asking what level ninja a user is.')"
|
||||
"text": "Your code should no longer have a <code>p</code> tag around the text asking what level ninja a user is.",
|
||||
"testString": "assert($('p').length == 4, 'Your code should no longer have a <code>p</code> tag around the text asking what level ninja a user is.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -831,20 +831,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add one <code>input</code> tag for the date selector field.'",
|
||||
"testString": "assert($('input').length == 2, 'Your code should add one <code>input</code> tag for the date selector field.')"
|
||||
"text": "Your code should add one <code>input</code> tag for the date selector field.",
|
||||
"testString": "assert($('input').length == 2, 'Your code should add one <code>input</code> tag for the date selector field.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.'",
|
||||
"testString": "assert($('input').attr('type') == 'date', 'Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.')"
|
||||
"text": "Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.",
|
||||
"testString": "assert($('input').attr('type') == 'date', 'Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.'",
|
||||
"testString": "assert($('input').attr('id') == 'pickdate', 'Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.')"
|
||||
"text": "Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.",
|
||||
"testString": "assert($('input').attr('id') == 'pickdate', 'Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.'",
|
||||
"testString": "assert($('input').attr('name') == 'date', 'Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.')"
|
||||
"text": "Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.",
|
||||
"testString": "assert($('input').attr('name') == 'date', 'Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -900,20 +900,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>time</code> tags should wrap around the text \"Thursday, September 15<sup>th</sup>\".'",
|
||||
"testString": "assert($('time').text().match(/Thursday, 'Your <code>time</code> tags should wrap around the text \"Thursday, September 15<sup>th</sup>\".')"
|
||||
"text": "Your <code>time</code> tags should wrap around the text \"Thursday, September 15<sup>th</sup>\".",
|
||||
"testString": "assert($('time').text().match(/Thursday, September 15th/g), 'Your <code>time</code> tags should wrap around the text \"Thursday, September 15<sup>th</sup>\".');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>time</code> tag should have a <code>datetime</code> attribute that is not empty.'",
|
||||
"testString": "assert($('time').attr('datetime'), 'Your <code>time</code> tag should have a <code>datetime</code> attribute that is not empty.')"
|
||||
"text": "Your <code>time</code> tag should have a <code>datetime</code> attribute that is not empty.",
|
||||
"testString": "assert($('time').attr('datetime'), 'Your <code>time</code> tag should have a <code>datetime</code> attribute that is not empty.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>datetime</code> attribute should be set to a value of 2016-09-15.'",
|
||||
"testString": "assert($('time').attr('datetime') === \"2016-09-15\", 'Your <code>datetime</code> attribute should be set to a value of 2016-09-15.')"
|
||||
"text": "Your <code>datetime</code> attribute should be set to a value of 2016-09-15.",
|
||||
"testString": "assert($('time').attr('datetime') === \"2016-09-15\", 'Your <code>datetime</code> attribute should be set to a value of 2016-09-15.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>time</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/time>/g) && code.match(/<\\/time>/g).length === 4, 'Make sure your <code>time</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>time</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/time>/g) && code.match(/<\\/time>/g).length === 4, 'Make sure your <code>time</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -983,20 +983,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.'",
|
||||
"testString": "assert($('.sr-only').css('position') == 'absolute', 'Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.')"
|
||||
"text": "Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.",
|
||||
"testString": "assert($('.sr-only').css('position') == 'absolute', 'Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.'",
|
||||
"testString": "assert($('.sr-only').css('left') == '-10000px', 'Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.')"
|
||||
"text": "Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.",
|
||||
"testString": "assert($('.sr-only').css('left') == '-10000px', 'Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.'",
|
||||
"testString": "assert(code.match(/width:\\s*?1px/gi), 'Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.')"
|
||||
"text": "Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.",
|
||||
"testString": "assert(code.match(/width:\\s*?1px/gi), 'Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.'",
|
||||
"testString": "assert(code.match(/height:\\s*?1px/gi), 'Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.')"
|
||||
"text": "Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.",
|
||||
"testString": "assert(code.match(/height:\\s*?1px/gi), 'Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1112,12 +1112,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.'",
|
||||
"testString": "assert($('body').css('color') == 'rgb(99, 'Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.')"
|
||||
"text": "Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.",
|
||||
"testString": "assert($('body').css('color') == 'rgb(99, 99, 99)', 'Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not change the <code>background-color</code> for the <code>body</code>.'",
|
||||
"testString": "assert($('body').css('background-color') == 'rgb(255, 'Your code should not change the <code>background-color</code> for the <code>body</code>.')"
|
||||
"text": "Your code should not change the <code>background-color</code> for the <code>body</code>.",
|
||||
"testString": "assert($('body').css('background-color') == 'rgb(255, 255, 255)', 'Your code should not change the <code>background-color</code> for the <code>body</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1169,12 +1169,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.'",
|
||||
"testString": "assert(code.match(/color:\\s*?hsl\\(0, 'Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.')"
|
||||
"text": "Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.",
|
||||
"testString": "assert(code.match(/color:\\s*?hsl\\(0,\\s*?55%,\\s*?15%\\)/gi), 'Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.'",
|
||||
"testString": "assert(code.match(/background-color:\\s*?hsl\\(120, 'Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.')"
|
||||
"text": "Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.",
|
||||
"testString": "assert(code.match(/background-color:\\s*?hsl\\(120,\\s*?25%,\\s*?55%\\)/gi), 'Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1225,8 +1225,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.'",
|
||||
"testString": "assert($('button').css('color') == 'rgb(0, 'Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.')"
|
||||
"text": "Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.",
|
||||
"testString": "assert($('button').css('color') == 'rgb(0, 51, 102)', 'Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1274,12 +1274,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".'",
|
||||
"testString": "assert($('a').text().match(/information about batteries/g), 'Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".')"
|
||||
"text": "Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".",
|
||||
"testString": "assert($('a').text().match(/information about batteries/g), 'Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>a</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a href=\"\">/g).length, 'Make sure your <code>a</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>a</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a href=\"\">/g).length, 'Make sure your <code>a</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1322,20 +1322,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"first\".'",
|
||||
"testString": "assert($('#first').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"first\".')"
|
||||
"text": "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"first\".",
|
||||
"testString": "assert($('#first').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"first\".');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"second\".'",
|
||||
"testString": "assert($('#second').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"second\".')"
|
||||
"text": "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"second\".",
|
||||
"testString": "assert($('#second').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of \"second\".');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"first\" to \"g\". Note that case matters.'",
|
||||
"testString": "assert($('#first').attr('accesskey') == 'g', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"first\" to \"g\". Note that case matters.')"
|
||||
"text": "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"first\" to \"g\". Note that case matters.",
|
||||
"testString": "assert($('#first').attr('accesskey') == 'g', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"first\" to \"g\". Note that case matters.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"second\" to \"c\". Note that case matters.'",
|
||||
"testString": "assert($('#second').attr('accesskey') == 'c', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"second\" to \"c\". Note that case matters.')"
|
||||
"text": "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"second\" to \"c\". Note that case matters.",
|
||||
"testString": "assert($('#second').attr('accesskey') == 'c', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of \"second\" to \"c\". Note that case matters.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1391,12 +1391,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the <code>p</code> tag that holds the form instructions.'",
|
||||
"testString": "assert($('p').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the <code>p</code> tag that holds the form instructions.')"
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the <code>p</code> tag that holds the form instructions.",
|
||||
"testString": "assert($('p').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the <code>p</code> tag that holds the form instructions.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the <code>p</code> tag to a value of 0.'",
|
||||
"testString": "assert($('p').attr('tabindex') == '0', 'Your code should set the <code>tabindex</code> attribute on the <code>p</code> tag to a value of 0.')"
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the <code>p</code> tag to a value of 0.",
|
||||
"testString": "assert($('p').attr('tabindex') == '0', 'Your code should set the <code>tabindex</code> attribute on the <code>p</code> tag to a value of 0.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1479,20 +1479,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the search <code>input</code> tag.'",
|
||||
"testString": "assert($('#search').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the search <code>input</code> tag.')"
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the search <code>input</code> tag.",
|
||||
"testString": "assert($('#search').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the search <code>input</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the submit <code>input</code> tag.'",
|
||||
"testString": "assert($('#submit').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the submit <code>input</code> tag.')"
|
||||
"text": "Your code should add a <code>tabindex</code> attribute to the submit <code>input</code> tag.",
|
||||
"testString": "assert($('#submit').attr('tabindex'), 'Your code should add a <code>tabindex</code> attribute to the submit <code>input</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the search <code>input</code> tag to a value of 1.'",
|
||||
"testString": "assert($('#search').attr('tabindex') == '1', 'Your code should set the <code>tabindex</code> attribute on the search <code>input</code> tag to a value of 1.')"
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the search <code>input</code> tag to a value of 1.",
|
||||
"testString": "assert($('#search').attr('tabindex') == '1', 'Your code should set the <code>tabindex</code> attribute on the search <code>input</code> tag to a value of 1.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the submit <code>input</code> tag to a value of 2.'",
|
||||
"testString": "assert($('#submit').attr('tabindex') == '2', 'Your code should set the <code>tabindex</code> attribute on the submit <code>input</code> tag to a value of 2.')"
|
||||
"text": "Your code should set the <code>tabindex</code> attribute on the submit <code>input</code> tag to a value of 2.",
|
||||
"testString": "assert($('#submit').attr('tabindex') == '2', 'Your code should set the <code>tabindex</code> attribute on the submit <code>input</code> tag to a value of 2.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
@ -19,12 +19,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the text-align property on the <code>h4</code> tag to set it to center.'",
|
||||
"testString": "assert($('h4').css('text-align') == 'center', 'Your code should use the text-align property on the <code>h4</code> tag to set it to center.')"
|
||||
"text": "Your code should use the text-align property on the <code>h4</code> tag to set it to center.",
|
||||
"testString": "assert($('h4').css('text-align') == 'center', 'Your code should use the text-align property on the <code>h4</code> tag to set it to center.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the text-align property on the <code>p</code> tag to set it to justify.'",
|
||||
"testString": "assert($('p').css('text-align') == 'justify', 'Your code should use the text-align property on the <code>p</code> tag to set it to justify.')"
|
||||
"text": "Your code should use the text-align property on the <code>p</code> tag to set it to justify.",
|
||||
"testString": "assert($('p').css('text-align') == 'justify', 'Your code should use the text-align property on the <code>p</code> tag to set it to justify.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -89,8 +89,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should change the <code>width</code> property of the card to 245 pixels by using the <code>fullCard</code> class selector.'",
|
||||
"testString": "assert(code.match(/.fullCard\\s*{[\\s\\S][^}]*\\n*^\\s*width\\s*:\\s*245px\\s*;/gm), 'Your code should change the <code>width</code> property of the card to 245 pixels by using the <code>fullCard</code> class selector.')"
|
||||
"text": "Your code should change the <code>width</code> property of the card to 245 pixels by using the <code>fullCard</code> class selector.",
|
||||
"testString": "assert(code.match(/.fullCard\\s*{[\\s\\S][^}]*\\n*^\\s*width\\s*:\\s*245px\\s*;/gm), 'Your code should change the <code>width</code> property of the card to 245 pixels by using the <code>fullCard</code> class selector.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -156,8 +156,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should change the <code>h4</code> <code>height</code> property to a value of 25 pixels.'",
|
||||
"testString": "assert($('h4').css('height') == '25px', 'Your code should change the <code>h4</code> <code>height</code> property to a value of 25 pixels.')"
|
||||
"text": "Your code should change the <code>h4</code> <code>height</code> property to a value of 25 pixels.",
|
||||
"testString": "assert($('h4').css('height') == '25px', 'Your code should change the <code>h4</code> <code>height</code> property to a value of 25 pixels.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -223,16 +223,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add one <code>strong</code> tag to the markup.'",
|
||||
"testString": "assert($('strong').length == 1, 'Your code should add one <code>strong</code> tag to the markup.')"
|
||||
"text": "Your code should add one <code>strong</code> tag to the markup.",
|
||||
"testString": "assert($('strong').length == 1, 'Your code should add one <code>strong</code> tag to the markup.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>strong</code> tag should be inside the <code>p</code> tag.'",
|
||||
"testString": "assert($('p').children('strong').length == 1, 'The <code>strong</code> tag should be inside the <code>p</code> tag.')"
|
||||
"text": "The <code>strong</code> tag should be inside the <code>p</code> tag.",
|
||||
"testString": "assert($('p').children('strong').length == 1, 'The <code>strong</code> tag should be inside the <code>p</code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>strong</code> tag should wrap around the words \"Stanford University\".'",
|
||||
"testString": "assert($('strong').text().match(/Stanford University/gi), 'The <code>strong</code> tag should wrap around the words \"Stanford University\".')"
|
||||
"text": "The <code>strong</code> tag should wrap around the words \"Stanford University\".",
|
||||
"testString": "assert($('strong').text().match(/Stanford University/gi), 'The <code>strong</code> tag should wrap around the words \"Stanford University\".');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -302,16 +302,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>u</code> tag to the markup.'",
|
||||
"testString": "assert($('u').length === 1, 'Your code should add a <code>u</code> tag to the markup.')"
|
||||
"text": "Your code should add a <code>u</code> tag to the markup.",
|
||||
"testString": "assert($('u').length === 1, 'Your code should add a <code>u</code> tag to the markup.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>u</code> tag should wrap around the text \"Ph.D. students\".'",
|
||||
"testString": "assert($('u').text() === 'Ph.D. students', 'The <code>u</code> tag should wrap around the text \"Ph.D. students\".')"
|
||||
"text": "The <code>u</code> tag should wrap around the text \"Ph.D. students\".",
|
||||
"testString": "assert($('u').text() === 'Ph.D. students', 'The <code>u</code> tag should wrap around the text \"Ph.D. students\".');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>u</code> tag should not wrap around the parent <code>div</code> tag.'",
|
||||
"testString": "assert($('u').children('div').length === 0, 'The <code>u</code> tag should not wrap around the parent <code>div</code> tag.')"
|
||||
"text": "The <code>u</code> tag should not wrap around the parent <code>div</code> tag.",
|
||||
"testString": "assert($('u').children('div').length === 0, 'The <code>u</code> tag should not wrap around the parent <code>div</code> tag.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -380,12 +380,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add an <code>em</code> tag to the markup.'",
|
||||
"testString": "assert($('em').length == 1, 'Your code should add an <code>em</code> tag to the markup.')"
|
||||
"text": "Your code should add an <code>em</code> tag to the markup.",
|
||||
"testString": "assert($('em').length == 1, 'Your code should add an <code>em</code> tag to the markup.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>em</code> tag should wrap around the <code>p</code> tag and its contents.'",
|
||||
"testString": "assert($('em').children('p').length == 1, 'The <code>em</code> tag should wrap around the <code>p</code> tag and its contents.')"
|
||||
"text": "The <code>em</code> tag should wrap around the <code>p</code> tag and its contents.",
|
||||
"testString": "assert($('em').children('p').length == 1, 'The <code>em</code> tag should wrap around the <code>p</code> tag and its contents.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -454,16 +454,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add one <code>del</code> tag to the markup.'",
|
||||
"testString": "assert($('del').length == 1, 'Your code should add one <code>del</code> tag to the markup.')"
|
||||
"text": "Your code should add one <code>del</code> tag to the markup.",
|
||||
"testString": "assert($('del').length == 1, 'Your code should add one <code>del</code> tag to the markup.');"
|
||||
},
|
||||
{
|
||||
"text": "A <code>del</code> tag should wrap around the Google text in the <code>h4</code> tag. It should not contain the word Alphabet.'",
|
||||
"testString": "assert($('del').text().match(/Google/gi) && !$('del').text().match(/Alphabet/gi), 'A <code>del</code> tag should wrap around the Google text in the <code>h4</code> tag. It should not contain the word Alphabet.')"
|
||||
"text": "A <code>del</code> tag should wrap around the Google text in the <code>h4</code> tag. It should not contain the word Alphabet.",
|
||||
"testString": "assert($('del').text().match(/Google/gi) && !$('del').text().match(/Alphabet/gi), 'A <code>del</code> tag should wrap around the Google text in the <code>h4</code> tag. It should not contain the word Alphabet.');"
|
||||
},
|
||||
{
|
||||
"text": "Include the word Alphabet in the <code>h4</code> tag, without strikethrough formatting.'",
|
||||
"testString": "assert($('h4').html().match(/Alphabet/gi), 'Include the word Alphabet in the <code>h4</code> tag, without strikethrough formatting.')"
|
||||
"text": "Include the word Alphabet in the <code>h4</code> tag, without strikethrough formatting.",
|
||||
"testString": "assert($('h4').html().match(/Alphabet/gi), 'Include the word Alphabet in the <code>h4</code> tag, without strikethrough formatting.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -533,12 +533,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add an <code>hr</code> tag to the markup.'",
|
||||
"testString": "assert($('hr').length == 1, 'Your code should add an <code>hr</code> tag to the markup.')"
|
||||
"text": "Your code should add an <code>hr</code> tag to the markup.",
|
||||
"testString": "assert($('hr').length == 1, 'Your code should add an <code>hr</code> tag to the markup.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>hr</code> tag should come between the title and the paragraph.'",
|
||||
"testString": "assert(code.match(/<\\/h4>\\s*?<hr(>|\\s*?\\/>)\\s*?<em>/gi), 'The <code>hr</code> tag should come between the title and the paragraph.')"
|
||||
"text": "The <code>hr</code> tag should come between the title and the paragraph.",
|
||||
"testString": "assert(code.match(/<\\/h4>\\s*?<hr(>|\\s*?\\/>)\\s*?<em>/gi), 'The <code>hr</code> tag should come between the title and the paragraph.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -612,16 +612,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>background-color</code> property to the <code>h4</code> element set to <code>rgba(45, 45, 45, 0.1)</code>.'",
|
||||
"testString": "assert(code.match(/background-color:\\s*?rgba\\(\\s*?45\\s*?, 'Your code should add a <code>background-color</code> property to the <code>h4</code> element set to <code>rgba(45, 45, 45, 0.1)</code>.')"
|
||||
"text": "Your code should add a <code>background-color</code> property to the <code>h4</code> element set to <code>rgba(45, 45, 45, 0.1)</code>.",
|
||||
"testString": "assert(code.match(/background-color:\\s*?rgba\\(\\s*?45\\s*?,\\s*?45\\s*?,\\s*?45\\s*?,\\s*?0?\\.1\\s*?\\)/gi), 'Your code should add a <code>background-color</code> property to the <code>h4</code> element set to <code>rgba(45, 45, 45, 0.1)</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should add a <code>padding</code> property to the <code>h4</code> element and set it to 10 pixels.'",
|
||||
"testString": "assert($('h4').css('padding-top') == '10px' && $('h4').css('padding-right') == '10px' && $('h4').css('padding-bottom') == '10px' && $('h4').css('padding-left') == '10px', 'Your code should add a <code>padding</code> property to the <code>h4</code> element and set it to 10 pixels.')"
|
||||
"text": "Your code should add a <code>padding</code> property to the <code>h4</code> element and set it to 10 pixels.",
|
||||
"testString": "assert($('h4').css('padding-top') == '10px' && $('h4').css('padding-right') == '10px' && $('h4').css('padding-bottom') == '10px' && $('h4').css('padding-left') == '10px', 'Your code should add a <code>padding</code> property to the <code>h4</code> element and set it to 10 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>height</code> property on the <code>h4</code> element should be removed.'",
|
||||
"testString": "assert(!($('h4').css('height') == '25px'), 'The <code>height</code> property on the <code>h4</code> element should be removed.')"
|
||||
"text": "The <code>height</code> property on the <code>h4</code> element should be removed.",
|
||||
"testString": "assert(!($('h4').css('height') == '25px'), 'The <code>height</code> property on the <code>h4</code> element should be removed.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -693,8 +693,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>font-size</code> property to the <code>h4</code> element set to 27 pixels.'",
|
||||
"testString": "assert($('h4').css('font-size') == '27px', 'Your code should add a <code>font-size</code> property to the <code>h4</code> element set to 27 pixels.')"
|
||||
"text": "Your code should add a <code>font-size</code> property to the <code>h4</code> element set to 27 pixels.",
|
||||
"testString": "assert($('h4').css('font-size') == '27px', 'Your code should add a <code>font-size</code> property to the <code>h4</code> element set to 27 pixels.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -769,12 +769,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should add a <code>box-shadow</code> property for the <code>thumbnail</code> id.'",
|
||||
"testString": "assert(code.match(/#thumbnail\\s*?{\\s*?box-shadow/g), 'Your code should add a <code>box-shadow</code> property for the <code>thumbnail</code> id.')"
|
||||
"text": "Your code should add a <code>box-shadow</code> property for the <code>thumbnail</code> id.",
|
||||
"testString": "assert(code.match(/#thumbnail\\s*?{\\s*?box-shadow/g), 'Your code should add a <code>box-shadow</code> property for the <code>thumbnail</code> id.');"
|
||||
},
|
||||
{
|
||||
"text": "You should use the given CSS for the <code>box-shadow</code> value.'",
|
||||
"testString": "assert(code.match(/box-shadow:\\s*?0\\s+?10px\\s+?20px\\s+?rgba\\(\\s*?0\\s*?, 'You should use the given CSS for the <code>box-shadow</code> value.')"
|
||||
"text": "You should use the given CSS for the <code>box-shadow</code> value.",
|
||||
"testString": "assert(code.match(/box-shadow:\\s*?0\\s+?10px\\s+?20px\\s+?rgba\\(\\s*?0\\s*?,\\s*?0\\s*?,\\s*?0\\s*?,\\s*?0?\\.19\\),\\s*?0\\s+?6px\\s+?6px\\s+?rgba\\(\\s*?0\\s*?,\\s*?0\\s*?,\\s*?0\\s*?,\\s*?0?\\.23\\)/gi), 'You should use the given CSS for the <code>box-shadow</code> value.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -851,8 +851,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>opacity</code> property to 0.7 on the anchor tags by selecting the class of <code>links</code>.'",
|
||||
"testString": "assert.approximately(parseFloat($('.links').css('opacity')), 'Your code should set the <code>opacity</code> property to 0.7 on the anchor tags by selecting the class of <code>links</code>.')"
|
||||
"text": "Your code should set the <code>opacity</code> property to 0.7 on the anchor tags by selecting the class of <code>links</code>.",
|
||||
"testString": "assert.approximately(parseFloat($('.links').css('opacity')), 0.7, 0.1, 'Your code should set the <code>opacity</code> property to 0.7 on the anchor tags by selecting the class of <code>links</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -930,12 +930,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>h4</code> text should be uppercase.'",
|
||||
"testString": "assert($('h4').css('text-transform') === 'uppercase', 'The <code>h4</code> text should be uppercase.')"
|
||||
"text": "The <code>h4</code> text should be uppercase.",
|
||||
"testString": "assert($('h4').css('text-transform') === 'uppercase', 'The <code>h4</code> text should be uppercase.');"
|
||||
},
|
||||
{
|
||||
"text": "The original text of the h4 should not be changed.'",
|
||||
"testString": "assert(($('h4').text() !== $('h4').text().toUpperCase()), 'The original text of the h4 should not be changed.')"
|
||||
"text": "The original text of the h4 should not be changed.",
|
||||
"testString": "assert(($('h4').text() !== $('h4').text().toUpperCase()), 'The original text of the h4 should not be changed.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1012,28 +1012,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h1</code> tag to 68 pixels.'",
|
||||
"testString": "assert($('h1').css('font-size') == '68px', 'Your code should set the <code>font-size</code> property for the <code>h1</code> tag to 68 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h1</code> tag to 68 pixels.",
|
||||
"testString": "assert($('h1').css('font-size') == '68px', 'Your code should set the <code>font-size</code> property for the <code>h1</code> tag to 68 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h2</code> tag to 52 pixels.'",
|
||||
"testString": "assert($('h2').css('font-size') == '52px', 'Your code should set the <code>font-size</code> property for the <code>h2</code> tag to 52 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h2</code> tag to 52 pixels.",
|
||||
"testString": "assert($('h2').css('font-size') == '52px', 'Your code should set the <code>font-size</code> property for the <code>h2</code> tag to 52 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h3</code> tag to 40 pixels.'",
|
||||
"testString": "assert($('h3').css('font-size') == '40px', 'Your code should set the <code>font-size</code> property for the <code>h3</code> tag to 40 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h3</code> tag to 40 pixels.",
|
||||
"testString": "assert($('h3').css('font-size') == '40px', 'Your code should set the <code>font-size</code> property for the <code>h3</code> tag to 40 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h4</code> tag to 32 pixels.'",
|
||||
"testString": "assert($('h4').css('font-size') == '32px', 'Your code should set the <code>font-size</code> property for the <code>h4</code> tag to 32 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h4</code> tag to 32 pixels.",
|
||||
"testString": "assert($('h4').css('font-size') == '32px', 'Your code should set the <code>font-size</code> property for the <code>h4</code> tag to 32 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h5</code> tag to 21 pixels.'",
|
||||
"testString": "assert($('h5').css('font-size') == '21px', 'Your code should set the <code>font-size</code> property for the <code>h5</code> tag to 21 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h5</code> tag to 21 pixels.",
|
||||
"testString": "assert($('h5').css('font-size') == '21px', 'Your code should set the <code>font-size</code> property for the <code>h5</code> tag to 21 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h6</code> tag to 14 pixels.'",
|
||||
"testString": "assert($('h6').css('font-size') == '14px', 'Your code should set the <code>font-size</code> property for the <code>h6</code> tag to 14 pixels.')"
|
||||
"text": "Your code should set the <code>font-size</code> property for the <code>h6</code> tag to 14 pixels.",
|
||||
"testString": "assert($('h6').css('font-size') == '14px', 'Your code should set the <code>font-size</code> property for the <code>h6</code> tag to 14 pixels.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1079,28 +1079,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h1</code> tag to 800.'",
|
||||
"testString": "assert($('h1').css('font-weight') == '800', 'Your code should set the <code>font-weight</code> property for the <code>h1</code> tag to 800.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h1</code> tag to 800.",
|
||||
"testString": "assert($('h1').css('font-weight') == '800', 'Your code should set the <code>font-weight</code> property for the <code>h1</code> tag to 800.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h2</code> tag to 600.'",
|
||||
"testString": "assert($('h2').css('font-weight') == '600', 'Your code should set the <code>font-weight</code> property for the <code>h2</code> tag to 600.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h2</code> tag to 600.",
|
||||
"testString": "assert($('h2').css('font-weight') == '600', 'Your code should set the <code>font-weight</code> property for the <code>h2</code> tag to 600.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h3</code> tag to 500.'",
|
||||
"testString": "assert($('h3').css('font-weight') == '500', 'Your code should set the <code>font-weight</code> property for the <code>h3</code> tag to 500.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h3</code> tag to 500.",
|
||||
"testString": "assert($('h3').css('font-weight') == '500', 'Your code should set the <code>font-weight</code> property for the <code>h3</code> tag to 500.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h4</code> tag to 400.'",
|
||||
"testString": "assert($('h4').css('font-weight') == '400', 'Your code should set the <code>font-weight</code> property for the <code>h4</code> tag to 400.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h4</code> tag to 400.",
|
||||
"testString": "assert($('h4').css('font-weight') == '400', 'Your code should set the <code>font-weight</code> property for the <code>h4</code> tag to 400.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h5</code> tag to 300.'",
|
||||
"testString": "assert($('h5').css('font-weight') == '300', 'Your code should set the <code>font-weight</code> property for the <code>h5</code> tag to 300.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h5</code> tag to 300.",
|
||||
"testString": "assert($('h5').css('font-weight') == '300', 'Your code should set the <code>font-weight</code> property for the <code>h5</code> tag to 300.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h6</code> tag to 200.'",
|
||||
"testString": "assert($('h6').css('font-weight') == '200', 'Your code should set the <code>font-weight</code> property for the <code>h6</code> tag to 200.')"
|
||||
"text": "Your code should set the <code>font-weight</code> property for the <code>h6</code> tag to 200.",
|
||||
"testString": "assert($('h6').css('font-weight') == '200', 'Your code should set the <code>font-weight</code> property for the <code>h6</code> tag to 200.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1163,8 +1163,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>p</code> tag should have a <code>font-size</code> of 16 pixels.'",
|
||||
"testString": "assert($('p').css('font-size') == '16px', 'Your <code>p</code> tag should have a <code>font-size</code> of 16 pixels.')"
|
||||
"text": "Your <code>p</code> tag should have a <code>font-size</code> of 16 pixels.",
|
||||
"testString": "assert($('p').css('font-size') == '16px', 'Your <code>p</code> tag should have a <code>font-size</code> of 16 pixels.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1203,8 +1203,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>line-height</code> of the <code>p</code> tag to 25 pixels.'",
|
||||
"testString": "assert($('p').css('line-height') == '25px', 'Your code should set the <code>line-height</code> of the <code>p</code> tag to 25 pixels.')"
|
||||
"text": "Your code should set the <code>line-height</code> of the <code>p</code> tag to 25 pixels.",
|
||||
"testString": "assert($('p').css('line-height') == '25px', 'Your code should set the <code>line-height</code> of the <code>p</code> tag to 25 pixels.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1246,12 +1246,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The anchor tag <code>color</code> should remain black, only add CSS rules for the <code>:hover</code> state.'",
|
||||
"testString": "assert($('a').css('color') == 'rgb(0, 'The anchor tag <code>color</code> should remain black, only add CSS rules for the <code>:hover</code> state.')"
|
||||
"text": "The anchor tag <code>color</code> should remain black, only add CSS rules for the <code>:hover</code> state.",
|
||||
"testString": "assert($('a').css('color') == 'rgb(0, 0, 0)', 'The anchor tag <code>color</code> should remain black, only add CSS rules for the <code>:hover</code> state.');"
|
||||
},
|
||||
{
|
||||
"text": "The anchor tag should have a <code>color</code> of blue on hover.'",
|
||||
"testString": "assert(code.match(/a:hover\\s*?{\\s*?color:\\s*?blue;\\s*?}/gi), 'The anchor tag should have a <code>color</code> of blue on hover.')"
|
||||
"text": "The anchor tag should have a <code>color</code> of blue on hover.",
|
||||
"testString": "assert(code.match(/a:hover\\s*?{\\s*?color:\\s*?blue;\\s*?}/gi), 'The anchor tag should have a <code>color</code> of blue on hover.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1295,12 +1295,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>h2</code> element should have a <code>position</code> property set to <code>relative</code>.'",
|
||||
"testString": "assert($('h2').css('position') == 'relative', 'The <code>h2</code> element should have a <code>position</code> property set to <code>relative</code>.')"
|
||||
"text": "The <code>h2</code> element should have a <code>position</code> property set to <code>relative</code>.",
|
||||
"testString": "assert($('h2').css('position') == 'relative', 'The <code>h2</code> element should have a <code>position</code> property set to <code>relative</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 15px away from the <code>top</code> of where it normally sits.'",
|
||||
"testString": "assert($('h2').css('top') == '15px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 15px away from the <code>top</code> of where it normally sits.')"
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 15px away from the <code>top</code> of where it normally sits.",
|
||||
"testString": "assert($('h2').css('top') == '15px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 15px away from the <code>top</code> of where it normally sits.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1343,12 +1343,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 10px upwards. In other words, move it 10px away from the <code>bottom</code> of where it normally sits.'",
|
||||
"testString": "assert($('h2').css('bottom') == '10px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 10px upwards. In other words, move it 10px away from the <code>bottom</code> of where it normally sits.')"
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 10px upwards. In other words, move it 10px away from the <code>bottom</code> of where it normally sits.",
|
||||
"testString": "assert($('h2').css('bottom') == '10px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 10px upwards. In other words, move it 10px away from the <code>bottom</code> of where it normally sits.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 15px towards the right. In other words, move it 15px away from the <code>left</code> of where it normally sits.'",
|
||||
"testString": "assert($('h2').css('left') == '15px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 15px towards the right. In other words, move it 15px away from the <code>left</code> of where it normally sits.')"
|
||||
"text": "Your code should use a CSS offset to relatively position the <code>h2</code> 15px towards the right. In other words, move it 15px away from the <code>left</code> of where it normally sits.",
|
||||
"testString": "assert($('h2').css('left') == '15px', 'Your code should use a CSS offset to relatively position the <code>h2</code> 15px towards the right. In other words, move it 15px away from the <code>left</code> of where it normally sits.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1394,16 +1394,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#searchbar</code> element should have a <code>position</code> set to <code>absolute</code>.'",
|
||||
"testString": "assert($('#searchbar').css('position') == 'absolute', 'The <code>#searchbar</code> element should have a <code>position</code> set to <code>absolute</code>.')"
|
||||
"text": "The <code>#searchbar</code> element should have a <code>position</code> set to <code>absolute</code>.",
|
||||
"testString": "assert($('#searchbar').css('position') == 'absolute', 'The <code>#searchbar</code> element should have a <code>position</code> set to <code>absolute</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>top</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.'",
|
||||
"testString": "assert($('#searchbar').css('top') == '0.5px', 'Your code should use the <code>top</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.')"
|
||||
"text": "Your code should use the <code>top</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.",
|
||||
"testString": "assert($('#searchbar').css('top') == '0.5px', 'Your code should use the <code>top</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>right</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.'",
|
||||
"testString": "assert($('#searchbar').css('right') == '0.5px', 'Your code should use the <code>right</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.')"
|
||||
"text": "Your code should use the <code>right</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.",
|
||||
"testString": "assert($('#searchbar').css('right') == '0.5px', 'Your code should use the <code>right</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1455,16 +1455,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#navbar</code> element should have a <code>position</code> set to <code>fixed</code>.'",
|
||||
"testString": "assert($('#navbar').css('position') == 'fixed', 'The <code>#navbar</code> element should have a <code>position</code> set to <code>fixed</code>.')"
|
||||
"text": "The <code>#navbar</code> element should have a <code>position</code> set to <code>fixed</code>.",
|
||||
"testString": "assert($('#navbar').css('position') == 'fixed', 'The <code>#navbar</code> element should have a <code>position</code> set to <code>fixed</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>top</code> CSS offset of 0 pixels on the <code>#navbar</code> element.'",
|
||||
"testString": "assert($('#navbar').css('top') == '0px', 'Your code should use the <code>top</code> CSS offset of 0 pixels on the <code>#navbar</code> element.')"
|
||||
"text": "Your code should use the <code>top</code> CSS offset of 0 pixels on the <code>#navbar</code> element.",
|
||||
"testString": "assert($('#navbar').css('top') == '0px', 'Your code should use the <code>top</code> CSS offset of 0 pixels on the <code>#navbar</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>left</code> CSS offset of 0 pixels on the <code>#navbar</code> element.'",
|
||||
"testString": "assert($('#navbar').css('left') == '0px', 'Your code should use the <code>left</code> CSS offset of 0 pixels on the <code>#navbar</code> element.')"
|
||||
"text": "Your code should use the <code>left</code> CSS offset of 0 pixels on the <code>#navbar</code> element.",
|
||||
"testString": "assert($('#navbar').css('left') == '0px', 'Your code should use the <code>left</code> CSS offset of 0 pixels on the <code>#navbar</code> element.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1527,12 +1527,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The element with id <code>left</code> should have a <code>float</code> value of <code>left</code>.'",
|
||||
"testString": "assert($('#left').css('float') == 'left', 'The element with id <code>left</code> should have a <code>float</code> value of <code>left</code>.')"
|
||||
"text": "The element with id <code>left</code> should have a <code>float</code> value of <code>left</code>.",
|
||||
"testString": "assert($('#left').css('float') == 'left', 'The element with id <code>left</code> should have a <code>float</code> value of <code>left</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The element with id <code>right</code> should have a <code>float</code> value of <code>right</code>.'",
|
||||
"testString": "assert($('#right').css('float') == 'right', 'The element with id <code>right</code> should have a <code>float</code> value of <code>right</code>.')"
|
||||
"text": "The element with id <code>right</code> should have a <code>float</code> value of <code>right</code>.",
|
||||
"testString": "assert($('#right').css('float') == 'right', 'The element with id <code>right</code> should have a <code>float</code> value of <code>right</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1592,8 +1592,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The element with class <code>first</code> should have a <code>z-index</code> value of 2.'",
|
||||
"testString": "assert($('.first').css('z-index') == '2', 'The element with class <code>first</code> should have a <code>z-index</code> value of 2.')"
|
||||
"text": "The element with class <code>first</code> should have a <code>z-index</code> value of 2.",
|
||||
"testString": "assert($('.first').css('z-index') == '2', 'The element with class <code>first</code> should have a <code>z-index</code> value of 2.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1648,8 +1648,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>div</code> should have a <code>margin</code> set to auto.'",
|
||||
"testString": "assert(code.match(/margin:\\s*?auto;/g), 'The <code>div</code> should have a <code>margin</code> set to auto.')"
|
||||
"text": "The <code>div</code> should have a <code>margin</code> set to auto.",
|
||||
"testString": "assert(code.match(/margin:\\s*?auto;/g), 'The <code>div</code> should have a <code>margin</code> set to auto.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1694,12 +1694,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.'",
|
||||
"testString": "assert($('.blue').css('background-color') == 'rgb(0, 'The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.')"
|
||||
"text": "The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.",
|
||||
"testString": "assert($('.blue').css('background-color') == 'rgb(0, 0, 255)', 'The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>yellow</code> should have a <code>background-color</code> of yellow.'",
|
||||
"testString": "assert($('.yellow').css('background-color') == 'rgb(255, 'The <code>div</code> element with class <code>yellow</code> should have a <code>background-color</code> of yellow.')"
|
||||
"text": "The <code>div</code> element with class <code>yellow</code> should have a <code>background-color</code> of yellow.",
|
||||
"testString": "assert($('.yellow').css('background-color') == 'rgb(255, 255, 0)', 'The <code>div</code> element with class <code>yellow</code> should have a <code>background-color</code> of yellow.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1752,16 +1752,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>orange</code> should have a <code>background-color</code> of orange.'",
|
||||
"testString": "assert($('.orange').css('background-color') == 'rgb(255, 'The <code>div</code> element with class <code>orange</code> should have a <code>background-color</code> of orange.')"
|
||||
"text": "The <code>div</code> element with class <code>orange</code> should have a <code>background-color</code> of orange.",
|
||||
"testString": "assert($('.orange').css('background-color') == 'rgb(255, 125, 0)', 'The <code>div</code> element with class <code>orange</code> should have a <code>background-color</code> of orange.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.'",
|
||||
"testString": "assert($('.cyan').css('background-color') == 'rgb(0, 'The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.')"
|
||||
"text": "The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.",
|
||||
"testString": "assert($('.cyan').css('background-color') == 'rgb(0, 255, 255)', 'The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>raspberry</code> should have a <code>background-color</code> of raspberry.'",
|
||||
"testString": "assert($('.raspberry').css('background-color') == 'rgb(255, 'The <code>div</code> element with class <code>raspberry</code> should have a <code>background-color</code> of raspberry.')"
|
||||
"text": "The <code>div</code> element with class <code>raspberry</code> should have a <code>background-color</code> of raspberry.",
|
||||
"testString": "assert($('.raspberry').css('background-color') == 'rgb(255, 0, 125)', 'The <code>div</code> element with class <code>raspberry</code> should have a <code>background-color</code> of raspberry.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1819,20 +1819,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>header</code> element should have a <code>background-color</code> of #09A7A1.'",
|
||||
"testString": "assert($('header').css('background-color') == 'rgb(9, 'The <code>header</code> element should have a <code>background-color</code> of #09A7A1.')"
|
||||
"text": "The <code>header</code> element should have a <code>background-color</code> of #09A7A1.",
|
||||
"testString": "assert($('header').css('background-color') == 'rgb(9, 167, 161)', 'The <code>header</code> element should have a <code>background-color</code> of #09A7A1.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>footer</code> element should have a <code>background-color</code> of #09A7A1.'",
|
||||
"testString": "assert($('footer').css('background-color') == 'rgb(9, 'The <code>footer</code> element should have a <code>background-color</code> of #09A7A1.')"
|
||||
"text": "The <code>footer</code> element should have a <code>background-color</code> of #09A7A1.",
|
||||
"testString": "assert($('footer').css('background-color') == 'rgb(9, 167, 161)', 'The <code>footer</code> element should have a <code>background-color</code> of #09A7A1.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>h2</code> element should have a <code>color</code> of #09A7A1.'",
|
||||
"testString": "assert($('h2').css('color') == 'rgb(9, 'The <code>h2</code> element should have a <code>color</code> of #09A7A1.')"
|
||||
"text": "The <code>h2</code> element should have a <code>color</code> of #09A7A1.",
|
||||
"testString": "assert($('h2').css('color') == 'rgb(9, 167, 161)', 'The <code>h2</code> element should have a <code>color</code> of #09A7A1.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>button</code> element should have a <code>background-color</code> of #FF790E.'",
|
||||
"testString": "assert($('button').css('background-color') == 'rgb(255, 'The <code>button</code> element should have a <code>background-color</code> of #FF790E.')"
|
||||
"text": "The <code>button</code> element should have a <code>background-color</code> of #FF790E.",
|
||||
"testString": "assert($('button').css('background-color') == 'rgb(255, 121, 14)', 'The <code>button</code> element should have a <code>background-color</code> of #FF790E.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1906,28 +1906,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color green.'",
|
||||
"testString": "assert(code.match(/\\.green\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color green.')"
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color green.",
|
||||
"testString": "assert(code.match(/\\.green\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color green.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color cyan.'",
|
||||
"testString": "assert(code.match(/\\.cyan\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color cyan.')"
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color cyan.",
|
||||
"testString": "assert(code.match(/\\.cyan\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color cyan.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color blue.'",
|
||||
"testString": "assert(code.match(/\\.blue\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color blue.')"
|
||||
"text": "Your code should use the <code>hsl()</code> property to declare the color blue.",
|
||||
"testString": "assert(code.match(/\\.blue\\s*?{\\s*?background-color:\\s*?hsl/gi), 'Your code should use the <code>hsl()</code> property to declare the color blue.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>green</code> should have a <code>background-color</code> of green.'",
|
||||
"testString": "assert($('.green').css('background-color') == 'rgb(0, 'The <code>div</code> element with class <code>green</code> should have a <code>background-color</code> of green.')"
|
||||
"text": "The <code>div</code> element with class <code>green</code> should have a <code>background-color</code> of green.",
|
||||
"testString": "assert($('.green').css('background-color') == 'rgb(0, 255, 0)', 'The <code>div</code> element with class <code>green</code> should have a <code>background-color</code> of green.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.'",
|
||||
"testString": "assert($('.cyan').css('background-color') == 'rgb(0, 'The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.')"
|
||||
"text": "The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.",
|
||||
"testString": "assert($('.cyan').css('background-color') == 'rgb(0, 255, 255)', 'The <code>div</code> element with class <code>cyan</code> should have a <code>background-color</code> of cyan.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.'",
|
||||
"testString": "assert($('.blue').css('background-color') == 'rgb(0, 'The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.')"
|
||||
"text": "The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.",
|
||||
"testString": "assert($('.blue').css('background-color') == 'rgb(0, 0, 255)', 'The <code>div</code> element with class <code>blue</code> should have a <code>background-color</code> of blue.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1985,8 +1985,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>nav</code> element should have a <code>background-color</code> of the adjusted cyan tone using the <code>hsl()</code> property.'",
|
||||
"testString": "assert(code.match(/nav\\s*?{\\s*?background-color:\\s*?hsl\\(180, 'The <code>nav</code> element should have a <code>background-color</code> of the adjusted cyan tone using the <code>hsl()</code> property.')"
|
||||
"text": "The <code>nav</code> element should have a <code>background-color</code> of the adjusted cyan tone using the <code>hsl()</code> property.",
|
||||
"testString": "assert(code.match(/nav\\s*?{\\s*?background-color:\\s*?hsl\\(180,\\s*?80%,\\s*?25%\\)/gi), 'The <code>nav</code> element should have a <code>background-color</code> of the adjusted cyan tone using the <code>hsl()</code> property.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2063,8 +2063,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.'",
|
||||
"testString": "assert(code.match(/background:\\s*?linear-gradient\\(35deg, 'The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.')"
|
||||
"text": "The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.",
|
||||
"testString": "assert(code.match(/background:\\s*?linear-gradient\\(35deg,\\s*?(#CCFFFF|#CFF),\\s*?(#FFCCCC|#FCC)\\);/gi), 'The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2113,28 +2113,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The angle of the <code>repeating-linear-gradient()</code> should be 45deg.'",
|
||||
"testString": "assert(code.match(/background:\\s*?repeating-linear-gradient\\(\\s*?45deg/gi), 'The angle of the <code>repeating-linear-gradient()</code> should be 45deg.')"
|
||||
"text": "The angle of the <code>repeating-linear-gradient()</code> should be 45deg.",
|
||||
"testString": "assert(code.match(/background:\\s*?repeating-linear-gradient\\(\\s*?45deg/gi), 'The angle of the <code>repeating-linear-gradient()</code> should be 45deg.');"
|
||||
},
|
||||
{
|
||||
"text": "The angle of the <code>repeating-linear-gradient()</code> should no longer be 90deg'",
|
||||
"testString": "assert(!code.match(/90deg/gi), 'The angle of the <code>repeating-linear-gradient()</code> should no longer be 90deg')"
|
||||
"text": "The angle of the <code>repeating-linear-gradient()</code> should no longer be 90deg",
|
||||
"testString": "assert(!code.match(/90deg/gi), 'The angle of the <code>repeating-linear-gradient()</code> should no longer be 90deg');"
|
||||
},
|
||||
{
|
||||
"text": "The color stop at 0 pixels should be <code>yellow</code>.'",
|
||||
"testString": "assert(code.match(/yellow\\s+?0px/gi), 'The color stop at 0 pixels should be <code>yellow</code>.')"
|
||||
"text": "The color stop at 0 pixels should be <code>yellow</code>.",
|
||||
"testString": "assert(code.match(/yellow\\s+?0px/gi), 'The color stop at 0 pixels should be <code>yellow</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "One color stop at 40 pixels should be <code>yellow</code>.'",
|
||||
"testString": "assert(code.match(/yellow\\s+?40px/gi), 'One color stop at 40 pixels should be <code>yellow</code>.')"
|
||||
"text": "One color stop at 40 pixels should be <code>yellow</code>.",
|
||||
"testString": "assert(code.match(/yellow\\s+?40px/gi), 'One color stop at 40 pixels should be <code>yellow</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The second color stop at 40 pixels should be <code>black</code>.'",
|
||||
"testString": "assert(code.match(/yellow\\s+?40px, 'The second color stop at 40 pixels should be <code>black</code>.')"
|
||||
"text": "The second color stop at 40 pixels should be <code>black</code>.",
|
||||
"testString": "assert(code.match(/yellow\\s+?40px,\\s*?black\\s+?40px/gi), 'The second color stop at 40 pixels should be <code>black</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The last color stop at 80 pixels should be <code>black</code>.'",
|
||||
"testString": "assert(code.match(/black\\s+?80px/gi), 'The last color stop at 80 pixels should be <code>black</code>.')"
|
||||
"text": "The last color stop at 80 pixels should be <code>black</code>.",
|
||||
"testString": "assert(code.match(/black\\s+?80px/gi), 'The last color stop at 80 pixels should be <code>black</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2184,8 +2184,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.'",
|
||||
"testString": "assert(code.match(/background:\\s*?url\\((\"|')https:\\/\\/i\\.imgur\\.com\\/MJAkxbh\\.png(\"|')\\)/gi), 'Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.')"
|
||||
"text": "Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.",
|
||||
"testString": "assert(code.match(/background:\\s*?url\\((\"|')https:\\/\\/i\\.imgur\\.com\\/MJAkxbh\\.png(\"|')\\)/gi), 'Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2224,8 +2224,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Set the <code>transform</code> property for <code>#ball2</code> to scale it 1.5 times its size.'",
|
||||
"testString": "assert(code.match(/#ball2\\s*?{\\s*?left:\\s*?65%;\\s*?transform:\\s*?scale\\(1\\.5\\);/gi), 'Set the <code>transform</code> property for <code>#ball2</code> to scale it 1.5 times its size.')"
|
||||
"text": "Set the <code>transform</code> property for <code>#ball2</code> to scale it 1.5 times its size.",
|
||||
"testString": "assert(code.match(/#ball2\\s*?{\\s*?left:\\s*?65%;\\s*?transform:\\s*?scale\\(1\\.5\\);/gi), 'Set the <code>transform</code> property for <code>#ball2</code> to scale it 1.5 times its size.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2284,8 +2284,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The size of the <code>div</code> element should scale 1.1 times when the user hovers over it.'",
|
||||
"testString": "assert(code.match(/div:hover\\s*?{\\s*?transform:\\s*?scale\\(1\\.1\\);/gi), 'The size of the <code>div</code> element should scale 1.1 times when the user hovers over it.')"
|
||||
"text": "The size of the <code>div</code> element should scale 1.1 times when the user hovers over it.",
|
||||
"testString": "assert(code.match(/div:hover\\s*?{\\s*?transform:\\s*?scale\\(1\\.1\\);/gi), 'The size of the <code>div</code> element should scale 1.1 times when the user hovers over it.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2337,8 +2337,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The element with id <code>bottom</code> should be skewed by 24 degrees along its X-axis.'",
|
||||
"testString": "assert(code.match(/#bottom\\s*?{\\s*?.*?\\s*?transform:\\s*?skewX\\(24deg\\);/g), 'The element with id <code>bottom</code> should be skewed by 24 degrees along its X-axis.')"
|
||||
"text": "The element with id <code>bottom</code> should be skewed by 24 degrees along its X-axis.",
|
||||
"testString": "assert(code.match(/#bottom\\s*?{\\s*?.*?\\s*?transform:\\s*?skewX\\(24deg\\);/g), 'The element with id <code>bottom</code> should be skewed by 24 degrees along its X-axis.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2388,8 +2388,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The element with id <code>top</code> should be skewed by -10 degrees along its Y-axis.'",
|
||||
"testString": "assert(code.match(/#top\\s*?{\\s*?.*?\\s*?transform:\\s*?skewY\\(-10deg\\);/g), 'The element with id <code>top</code> should be skewed by -10 degrees along its Y-axis.')"
|
||||
"text": "The element with id <code>top</code> should be skewed by -10 degrees along its Y-axis.",
|
||||
"testString": "assert(code.match(/#top\\s*?{\\s*?.*?\\s*?transform:\\s*?skewY\\(-10deg\\);/g), 'The element with id <code>top</code> should be skewed by -10 degrees along its Y-axis.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2441,16 +2441,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The value of the <code>background-color</code> property should be set to <code>transparent</code>.'",
|
||||
"testString": "assert(code.match(/background-color:\\s*?transparent;/gi), 'The value of the <code>background-color</code> property should be set to <code>transparent</code>.')"
|
||||
"text": "The value of the <code>background-color</code> property should be set to <code>transparent</code>.",
|
||||
"testString": "assert(code.match(/background-color:\\s*?transparent;/gi), 'The value of the <code>background-color</code> property should be set to <code>transparent</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The value of the <code>border-radius</code> property should be set to <code>50%</code>.'",
|
||||
"testString": "assert(code.match(/border-radius:\\s*?50%;/gi), 'The value of the <code>border-radius</code> property should be set to <code>50%</code>.')"
|
||||
"text": "The value of the <code>border-radius</code> property should be set to <code>50%</code>.",
|
||||
"testString": "assert(code.match(/border-radius:\\s*?50%;/gi), 'The value of the <code>border-radius</code> property should be set to <code>50%</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The value of the <code>box-shadow</code> property should be set to 25px for <code>offset-x</code>, 10px for <code>offset-y</code>, 0 for <code>blur-radius</code>, 0 for <code>spread-radius</code>, and finally blue for the color.'",
|
||||
"testString": "assert(code.match(/box-shadow:\\s*?25px\\s+?10px\\s+?0(px)?\\s+?0(px)?\\s+?blue\\s*?;/gi), 'The value of the <code>box-shadow</code> property should be set to 25px for <code>offset-x</code>, 10px for <code>offset-y</code>, 0 for <code>blur-radius</code>, 0 for <code>spread-radius</code>, and finally blue for the color.')"
|
||||
"text": "The value of the <code>box-shadow</code> property should be set to 25px for <code>offset-x</code>, 10px for <code>offset-y</code>, 0 for <code>blur-radius</code>, 0 for <code>spread-radius</code>, and finally blue for the color.",
|
||||
"testString": "assert(code.match(/box-shadow:\\s*?25px\\s+?10px\\s+?0(px)?\\s+?0(px)?\\s+?blue\\s*?;/gi), 'The value of the <code>box-shadow</code> property should be set to 25px for <code>offset-x</code>, 10px for <code>offset-y</code>, 0 for <code>blur-radius</code>, 0 for <code>spread-radius</code>, and finally blue for the color.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2505,20 +2505,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>background-color</code> property of the <code>heart:after</code> selector should be pink.'",
|
||||
"testString": "assert(code.match(/\\.heart:after\\s*?{\\s*?background-color:\\s*?pink;/gi), 'The <code>background-color</code> property of the <code>heart:after</code> selector should be pink.')"
|
||||
"text": "The <code>background-color</code> property of the <code>heart:after</code> selector should be pink.",
|
||||
"testString": "assert(code.match(/\\.heart:after\\s*?{\\s*?background-color:\\s*?pink;/gi), 'The <code>background-color</code> property of the <code>heart:after</code> selector should be pink.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>border-radius</code> of the <code>heart:after</code> selector should be 50%.'",
|
||||
"testString": "assert(code.match(/border-radius:\\s*?50%/gi).length == 2, 'The <code>border-radius</code> of the <code>heart:after</code> selector should be 50%.')"
|
||||
"text": "The <code>border-radius</code> of the <code>heart:after</code> selector should be 50%.",
|
||||
"testString": "assert(code.match(/border-radius:\\s*?50%/gi).length == 2, 'The <code>border-radius</code> of the <code>heart:after</code> selector should be 50%.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>transform</code> property for the <code>heart</code> class should use a <code>rotate()</code> function set to -45 degrees.'",
|
||||
"testString": "assert(code.match(/transform:\\s*?rotate\\(-45deg\\)/gi), 'The <code>transform</code> property for the <code>heart</code> class should use a <code>rotate()</code> function set to -45 degrees.')"
|
||||
"text": "The <code>transform</code> property for the <code>heart</code> class should use a <code>rotate()</code> function set to -45 degrees.",
|
||||
"testString": "assert(code.match(/transform:\\s*?rotate\\(-45deg\\)/gi), 'The <code>transform</code> property for the <code>heart</code> class should use a <code>rotate()</code> function set to -45 degrees.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>content</code> of the <code>heart:before</code> selector should be an empty string.'",
|
||||
"testString": "assert(code.match(/\\.heart:before\\s*?{\\s*?content:\\s*?(\"|')\\1;/gi), 'The <code>content</code> of the <code>heart:before</code> selector should be an empty string.')"
|
||||
"text": "The <code>content</code> of the <code>heart:before</code> selector should be an empty string.",
|
||||
"testString": "assert(code.match(/\\.heart:before\\s*?{\\s*?content:\\s*?(\"|')\\1;/gi), 'The <code>content</code> of the <code>heart:before</code> selector should be an empty string.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2589,28 +2589,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The element with id of <code>rect</code> should have an <code>animation-name</code> property with a value of rainbow.'",
|
||||
"testString": "assert($('#rect').css('animation-name') == 'rainbow', 'The element with id of <code>rect</code> should have an <code>animation-name</code> property with a value of rainbow.')"
|
||||
"text": "The element with id of <code>rect</code> should have an <code>animation-name</code> property with a value of rainbow.",
|
||||
"testString": "assert($('#rect').css('animation-name') == 'rainbow', 'The element with id of <code>rect</code> should have an <code>animation-name</code> property with a value of rainbow.');"
|
||||
},
|
||||
{
|
||||
"text": "The element with id of <code>rect</code> should have an <code>animation-duration</code> property with a value of 4s.'",
|
||||
"testString": "assert($('#rect').css('animation-duration') == '4s', 'The element with id of <code>rect</code> should have an <code>animation-duration</code> property with a value of 4s.')"
|
||||
"text": "The element with id of <code>rect</code> should have an <code>animation-duration</code> property with a value of 4s.",
|
||||
"testString": "assert($('#rect').css('animation-duration') == '4s', 'The element with id of <code>rect</code> should have an <code>animation-duration</code> property with a value of 4s.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule should use the <code>animation-name</code> of rainbow.'",
|
||||
"testString": "assert(code.match(/@keyframes\\s+?rainbow\\s*?{/g), 'The <code>@keyframes</code> rule should use the <code>animation-name</code> of rainbow.')"
|
||||
"text": "The <code>@keyframes</code> rule should use the <code>animation-name</code> of rainbow.",
|
||||
"testString": "assert(code.match(/@keyframes\\s+?rainbow\\s*?{/g), 'The <code>@keyframes</code> rule should use the <code>animation-name</code> of rainbow.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of blue at 0%.'",
|
||||
"testString": "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of blue at 0%.')"
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of blue at 0%.",
|
||||
"testString": "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of blue at 0%.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of green at 50%.'",
|
||||
"testString": "assert(code.match(/50%\\s*?{\\s*?background-color:\\s*?green;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of green at 50%.')"
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of green at 50%.",
|
||||
"testString": "assert(code.match(/50%\\s*?{\\s*?background-color:\\s*?green;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of green at 50%.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of yellow at 100%.'",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of yellow at 100%.')"
|
||||
"text": "The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of yellow at 100%.",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?}/gi), 'The <code>@keyframes</code> rule for rainbow should use a <code>background-color</code> of yellow at 100%.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2665,12 +2665,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The @keyframes rule should use the <code>animation-name</code> background-color.'",
|
||||
"testString": "assert(code.match(/@keyframes\\s+?background-color\\s*?{/g), 'The @keyframes rule should use the <code>animation-name</code> background-color.')"
|
||||
"text": "The @keyframes rule should use the <code>animation-name</code> background-color.",
|
||||
"testString": "assert(code.match(/@keyframes\\s+?background-color\\s*?{/g), 'The @keyframes rule should use the <code>animation-name</code> background-color.');"
|
||||
},
|
||||
{
|
||||
"text": "There should be one rule under <code>@keyframes</code> that changes the <code>background-color</code> to <code>#4791d0</code> at 100%.'",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?#4791d0;\\s*?}/gi), 'There should be one rule under <code>@keyframes</code> that changes the <code>background-color</code> to <code>#4791d0</code> at 100%.')"
|
||||
"text": "There should be one rule under <code>@keyframes</code> that changes the <code>background-color</code> to <code>#4791d0</code> at 100%.",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?#4791d0;\\s*?}/gi), 'There should be one rule under <code>@keyframes</code> that changes the <code>background-color</code> to <code>#4791d0</code> at 100%.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2720,8 +2720,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>button:hover</code> should have a <code>animation-fill-mode</code> property with a value of <code>forwards</code>.'",
|
||||
"testString": "assert(code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-fill-mode\\s*?:\\s*?forwards\\s*?;[\\s\\S]*}/gi) && code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-name\\s*?:\\s*?background-color\\s*?;[\\s\\S]*}/gi) && code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-duration\\s*?:\\s*?500ms\\s*?;[\\s\\S]*}/gi), '<code>button:hover</code> should have a <code>animation-fill-mode</code> property with a value of <code>forwards</code>.')"
|
||||
"text": "<code>button:hover</code> should have a <code>animation-fill-mode</code> property with a value of <code>forwards</code>.",
|
||||
"testString": "assert(code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-fill-mode\\s*?:\\s*?forwards\\s*?;[\\s\\S]*}/gi) && code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-name\\s*?:\\s*?background-color\\s*?;[\\s\\S]*}/gi) && code.match(/button\\s*?:\\s*?hover\\s*?{[\\s\\S]*animation-duration\\s*?:\\s*?500ms\\s*?;[\\s\\S]*}/gi), '<code>button:hover</code> should have a <code>animation-fill-mode</code> property with a value of <code>forwards</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2774,16 +2774,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.'",
|
||||
"testString": "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0px;\\s*?left:\\s*?0px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.')"
|
||||
"text": "The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.",
|
||||
"testString": "assert(code.match(/0%\\s*?{\\s*?background-color:\\s*?blue;\\s*?top:\\s*?0px;\\s*?left:\\s*?0px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>0%</code> should use the <code>left</code> offset of 0px.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for <code>50%</code> should use the <code>left</code> offset of 25px.'",
|
||||
"testString": "assert(code.match(/50%\\s*?{\\s*?background-color:\\s*?green;\\s*?top:\\s*?50px;\\s*?left:\\s*?25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>50%</code> should use the <code>left</code> offset of 25px.')"
|
||||
"text": "The <code>@keyframes</code> rule for <code>50%</code> should use the <code>left</code> offset of 25px.",
|
||||
"testString": "assert(code.match(/50%\\s*?{\\s*?background-color:\\s*?green;\\s*?top:\\s*?50px;\\s*?left:\\s*?25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>50%</code> should use the <code>left</code> offset of 25px.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.'",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0px;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.')"
|
||||
"text": "The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.",
|
||||
"testString": "assert(code.match(/100%\\s*?{\\s*?background-color:\\s*?yellow;\\s*?top:\\s*?0px;\\s*?left:\\s*?-25px;\\s*?}/gi), 'The <code>@keyframes</code> rule for <code>100%</code> should use the <code>left</code> offset of -25px.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2850,8 +2850,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>keyframes</code> rule for fade should set the <code>opacity</code> property to 0.1 at 50%.'",
|
||||
"testString": "assert(code.match(/@keyframes fade\\s*?{\\s*?50%\\s*?{\\s*?(?:left:\\s*?60%;\\s*?opacity:\\s*?0?\\.1;|opacity:\\s*?0?\\.1;\\s*?left:\\s*?60%;)/gi), 'The <code>keyframes</code> rule for fade should set the <code>opacity</code> property to 0.1 at 50%.')"
|
||||
"text": "The <code>keyframes</code> rule for fade should set the <code>opacity</code> property to 0.1 at 50%.",
|
||||
"testString": "assert(code.match(/@keyframes fade\\s*?{\\s*?50%\\s*?{\\s*?(?:left:\\s*?60%;\\s*?opacity:\\s*?0?\\.1;|opacity:\\s*?0?\\.1;\\s*?left:\\s*?60%;)/gi), 'The <code>keyframes</code> rule for fade should set the <code>opacity</code> property to 0.1 at 50%.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2912,8 +2912,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>animation-iteration-count</code> property should have a value of infinite.'",
|
||||
"testString": "assert($('#ball').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property should have a value of infinite.')"
|
||||
"text": "The <code>animation-iteration-count</code> property should have a value of infinite.",
|
||||
"testString": "assert($('#ball').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property should have a value of infinite.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -2978,12 +2978,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>animation-iteration-count</code> property for the <code>heart</code> class should have a value of infinite.'",
|
||||
"testString": "assert($('.heart').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property for the <code>heart</code> class should have a value of infinite.')"
|
||||
"text": "The <code>animation-iteration-count</code> property for the <code>heart</code> class should have a value of infinite.",
|
||||
"testString": "assert($('.heart').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property for the <code>heart</code> class should have a value of infinite.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>animation-iteration-count</code> property for the <code>back</code> class should have a value of infinite.'",
|
||||
"testString": "assert($('.back').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property for the <code>back</code> class should have a value of infinite.')"
|
||||
"text": "The <code>animation-iteration-count</code> property for the <code>back</code> class should have a value of infinite.",
|
||||
"testString": "assert($('.back').css('animation-iteration-count') == 'infinite', 'The <code>animation-iteration-count</code> property for the <code>back</code> class should have a value of infinite.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3084,8 +3084,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>@keyframes</code> rule for the <code>star-1</code> class should be 50%.'",
|
||||
"testString": "assert(code.match(/twinkle-1\\s*?{\\s*?50%/g), 'The <code>@keyframes</code> rule for the <code>star-1</code> class should be 50%.')"
|
||||
"text": "The <code>@keyframes</code> rule for the <code>star-1</code> class should be 50%.",
|
||||
"testString": "assert(code.match(/twinkle-1\\s*?{\\s*?50%/g), 'The <code>@keyframes</code> rule for the <code>star-1</code> class should be 50%.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3171,16 +3171,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-1</code> should remain at 1s.'",
|
||||
"testString": "assert($('.star-1').css('animation-duration') == '1s', 'The <code>animation-duration</code> property for the star with class <code>star-1</code> should remain at 1s.')"
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-1</code> should remain at 1s.",
|
||||
"testString": "assert($('.star-1').css('animation-duration') == '1s', 'The <code>animation-duration</code> property for the star with class <code>star-1</code> should remain at 1s.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-2</code> should be 0.9s.'",
|
||||
"testString": "assert($('.star-2').css('animation-duration') == '0.9s', 'The <code>animation-duration</code> property for the star with class <code>star-2</code> should be 0.9s.')"
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-2</code> should be 0.9s.",
|
||||
"testString": "assert($('.star-2').css('animation-duration') == '0.9s', 'The <code>animation-duration</code> property for the star with class <code>star-2</code> should be 0.9s.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-3</code> should be 1.1s.'",
|
||||
"testString": "assert($('.star-3').css('animation-duration') == '1.1s', 'The <code>animation-duration</code> property for the star with class <code>star-3</code> should be 1.1s.')"
|
||||
"text": "The <code>animation-duration</code> property for the star with class <code>star-3</code> should be 1.1s.",
|
||||
"testString": "assert($('.star-3').css('animation-duration') == '1.1s', 'The <code>animation-duration</code> property for the star with class <code>star-3</code> should be 1.1s.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3265,12 +3265,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be linear.'",
|
||||
"testString": "assert($('#ball1').css('animation-timing-function') == 'linear', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be linear.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be linear.",
|
||||
"testString": "assert($('#ball1').css('animation-timing-function') == 'linear', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be linear.');"
|
||||
},
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should be ease-out.'",
|
||||
"testString": "assert($('#ball2').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should be ease-out.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should be ease-out.",
|
||||
"testString": "assert($('#ball2').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should be ease-out.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3344,12 +3344,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be the linear-equivalent cubic-bezier function.'",
|
||||
"testString": "assert($('#ball1').css('animation-timing-function') == 'cubic-bezier(0.25, 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be the linear-equivalent cubic-bezier function.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be the linear-equivalent cubic-bezier function.",
|
||||
"testString": "assert($('#ball1').css('animation-timing-function') == 'cubic-bezier(0.25, 0.25, 0.75, 0.75)', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball1</code> should be the linear-equivalent cubic-bezier function.');"
|
||||
},
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should not change.'",
|
||||
"testString": "assert($('#ball2').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should not change.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should not change.",
|
||||
"testString": "assert($('#ball2').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>ball2</code> should not change.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3422,16 +3422,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property of the element with the id <code>red</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values set respectively to 0, 0, 0.58, 1 .'",
|
||||
"testString": "assert($('#red').css('animation-timing-function') == 'cubic-bezier(0, 'The value of the <code>animation-timing-function</code> property of the element with the id <code>red</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values set respectively to 0, 0, 0.58, 1 .')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property of the element with the id <code>red</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values set respectively to 0, 0, 0.58, 1 .",
|
||||
"testString": "assert($('#red').css('animation-timing-function') == 'cubic-bezier(0, 0, 0.58, 1)', 'The value of the <code>animation-timing-function</code> property of the element with the id <code>red</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values set respectively to 0, 0, 0.58, 1 .');"
|
||||
},
|
||||
{
|
||||
"text": "The element with the id <code>red</code> should no longer have the <code>animation-timing-function</code> property of linear.'",
|
||||
"testString": "assert($('#red').css('animation-timing-function') !== 'linear', 'The element with the id <code>red</code> should no longer have the <code>animation-timing-function</code> property of linear.')"
|
||||
"text": "The element with the id <code>red</code> should no longer have the <code>animation-timing-function</code> property of linear.",
|
||||
"testString": "assert($('#red').css('animation-timing-function') !== 'linear', 'The element with the id <code>red</code> should no longer have the <code>animation-timing-function</code> property of linear.');"
|
||||
},
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>blue</code> should not change.'",
|
||||
"testString": "assert($('#blue').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>blue</code> should not change.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>blue</code> should not change.",
|
||||
"testString": "assert($('#blue').css('animation-timing-function') == 'ease-out', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>blue</code> should not change.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -3498,8 +3498,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>green</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values as specified.'",
|
||||
"testString": "assert($('#green').css('animation-timing-function') == 'cubic-bezier(0.311, 'The value of the <code>animation-timing-function</code> property for the element with the id <code>green</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values as specified.')"
|
||||
"text": "The value of the <code>animation-timing-function</code> property for the element with the id <code>green</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values as specified.",
|
||||
"testString": "assert($('#green').css('animation-timing-function') == 'cubic-bezier(0.311, 0.441, 0.444, 1.649)', 'The value of the <code>animation-timing-function</code> property for the element with the id <code>green</code> should be a <code>cubic-bezier</code> function with x1, y1, x2, y2 values as specified.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -125,20 +125,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Create an <code>h2</code> element.'",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Create an <code>h2</code> element.')"
|
||||
"text": "Create an <code>h2</code> element.",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Create an <code>h2</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>h2</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/h2>/g) && code.match(/<\\/h2>/g).length === code.match(/<h2>/g).length, 'Make sure your <code>h2</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>h2</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/h2>/g) && code.match(/<\\/h2>/g).length === code.match(/<h2>/g).length, 'Make sure your <code>h2</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>h2</code> element should have the text \"CatPhotoApp\".'",
|
||||
"testString": "assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($(\"h2\").text()), 'Your <code>h2</code> element should have the text \"CatPhotoApp\".')"
|
||||
"text": "Your <code>h2</code> element should have the text \"CatPhotoApp\".",
|
||||
"testString": "assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($(\"h2\").text()), 'Your <code>h2</code> element should have the text \"CatPhotoApp\".');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>h1</code> element should have the text \"Hello World\".'",
|
||||
"testString": "assert.isTrue((/hello(\\s)+world/gi).test($(\"h1\").text()), 'Your <code>h1</code> element should have the text \"Hello World\".')"
|
||||
"text": "Your <code>h1</code> element should have the text \"Hello World\".",
|
||||
"testString": "assert.isTrue((/hello(\\s)+world/gi).test($(\"h1\").text()), 'Your <code>h1</code> element should have the text \"Hello World\".');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -213,16 +213,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Create a <code>p</code> element.'",
|
||||
"testString": "assert(($(\"p\").length > 0), 'Create a <code>p</code> element.')"
|
||||
"text": "Create a <code>p</code> element.",
|
||||
"testString": "assert(($(\"p\").length > 0), 'Create a <code>p</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>p</code> element should have the text \"Hello Paragraph\".'",
|
||||
"testString": "assert.isTrue((/hello(\\s)+paragraph/gi).test($(\"p\").text()), 'Your <code>p</code> element should have the text \"Hello Paragraph\".')"
|
||||
"text": "Your <code>p</code> element should have the text \"Hello Paragraph\".",
|
||||
"testString": "assert.isTrue((/hello(\\s)+paragraph/gi).test($(\"p\").text()), 'Your <code>p</code> element should have the text \"Hello Paragraph\".');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>p</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure your <code>p</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>p</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure your <code>p</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -294,8 +294,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>p</code> element should contain the first few words of the provided <code>kitty ipsum text</code>.'",
|
||||
"testString": "assert.isTrue((/Kitty(\\s)+ipsum/gi).test($(\"p\").text()), 'Your <code>p</code> element should contain the first few words of the provided <code>kitty ipsum text</code>.')"
|
||||
"text": "Your <code>p</code> element should contain the first few words of the provided <code>kitty ipsum text</code>.",
|
||||
"testString": "assert.isTrue((/Kitty(\\s)+ipsum/gi).test($(\"p\").text()), 'Your <code>p</code> element should contain the first few words of the provided <code>kitty ipsum text</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -370,20 +370,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Make your <code>h1</code> element visible on your page by uncommenting it.'",
|
||||
"testString": "assert($(\"h1\").length > 0, 'Make your <code>h1</code> element visible on your page by uncommenting it.')"
|
||||
"text": "Make your <code>h1</code> element visible on your page by uncommenting it.",
|
||||
"testString": "assert($(\"h1\").length > 0, 'Make your <code>h1</code> element visible on your page by uncommenting it.');"
|
||||
},
|
||||
{
|
||||
"text": "Make your <code>h2</code> element visible on your page by uncommenting it.'",
|
||||
"testString": "assert($(\"h2\").length > 0, 'Make your <code>h2</code> element visible on your page by uncommenting it.')"
|
||||
"text": "Make your <code>h2</code> element visible on your page by uncommenting it.",
|
||||
"testString": "assert($(\"h2\").length > 0, 'Make your <code>h2</code> element visible on your page by uncommenting it.');"
|
||||
},
|
||||
{
|
||||
"text": "Make your <code>p</code> element visible on your page by uncommenting it.'",
|
||||
"testString": "assert($(\"p\").length > 0, 'Make your <code>p</code> element visible on your page by uncommenting it.')"
|
||||
"text": "Make your <code>p</code> element visible on your page by uncommenting it.",
|
||||
"testString": "assert($(\"p\").length > 0, 'Make your <code>p</code> element visible on your page by uncommenting it.');"
|
||||
},
|
||||
{
|
||||
"text": "Be sure to delete all trailing comment tags, i.e. <code>--></code>.'",
|
||||
"testString": "assert(!/[^fc]-->/gi.test(code.replace(/ *<!--[^fc]*\\n/g, 'Be sure to delete all trailing comment tags, i.e. <code>--></code>.')"
|
||||
"text": "Be sure to delete all trailing comment tags, i.e. <code>--></code>.",
|
||||
"testString": "assert(!/[^fc]-->/gi.test(code.replace(/ *<!--[^fc]*\\n/g,'')), 'Be sure to delete all trailing comment tags, i.e. <code>--></code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -459,24 +459,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Comment out your <code>h1</code> element so that it is not visible on your page.'",
|
||||
"testString": "assert(($(\"h1\").length === 0), 'Comment out your <code>h1</code> element so that it is not visible on your page.')"
|
||||
"text": "Comment out your <code>h1</code> element so that it is not visible on your page.",
|
||||
"testString": "assert(($(\"h1\").length === 0), 'Comment out your <code>h1</code> element so that it is not visible on your page.');"
|
||||
},
|
||||
{
|
||||
"text": "Leave your <code>h2</code> element uncommented so that it is visible on your page.'",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Leave your <code>h2</code> element uncommented so that it is visible on your page.')"
|
||||
"text": "Leave your <code>h2</code> element uncommented so that it is visible on your page.",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Leave your <code>h2</code> element uncommented so that it is visible on your page.');"
|
||||
},
|
||||
{
|
||||
"text": "Comment out your <code>p</code> element so that it is not visible on your page.'",
|
||||
"testString": "assert(($(\"p\").length === 0), 'Comment out your <code>p</code> element so that it is not visible on your page.')"
|
||||
"text": "Comment out your <code>p</code> element so that it is not visible on your page.",
|
||||
"testString": "assert(($(\"p\").length === 0), 'Comment out your <code>p</code> element so that it is not visible on your page.');"
|
||||
},
|
||||
{
|
||||
"text": "Be sure to close each of your comments with <code>--></code>.'",
|
||||
"testString": "assert(code.match(/[^fc]-->/g).length > 1, 'Be sure to close each of your comments with <code>--></code>.')"
|
||||
"text": "Be sure to close each of your comments with <code>--></code>.",
|
||||
"testString": "assert(code.match(/[^fc]-->/g).length > 1, 'Be sure to close each of your comments with <code>--></code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.'",
|
||||
"testString": "assert((code.match(/<([a-z0-9]){1, 'Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.')"
|
||||
"text": "Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.",
|
||||
"testString": "assert((code.match(/<([a-z0-9]){1,2}>/g)[0]===\"<h1>\" && code.match(/<([a-z0-9]){1,2}>/g)[1]===\"<h2>\" && code.match(/<([a-z0-9]){1,2}>/g)[2]===\"<p>\") , 'Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -548,16 +548,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Delete your <code>h1</code> element.'",
|
||||
"testString": "assert(($(\"h1\").length == 0), 'Delete your <code>h1</code> element.')"
|
||||
"text": "Delete your <code>h1</code> element.",
|
||||
"testString": "assert(($(\"h1\").length == 0), 'Delete your <code>h1</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Leave your <code>h2</code> element on the page.'",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Leave your <code>h2</code> element on the page.')"
|
||||
"text": "Leave your <code>h2</code> element on the page.",
|
||||
"testString": "assert(($(\"h2\").length > 0), 'Leave your <code>h2</code> element on the page.');"
|
||||
},
|
||||
{
|
||||
"text": "Leave your <code>p</code> element on the page.'",
|
||||
"testString": "assert(($(\"p\").length > 0), 'Leave your <code>p</code> element on the page.')"
|
||||
"text": "Leave your <code>p</code> element on the page.",
|
||||
"testString": "assert(($(\"p\").length > 0), 'Leave your <code>p</code> element on the page.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -630,32 +630,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "You need 2 <code>p</code> elements with Kitty Ipsum text.'",
|
||||
"testString": "assert($(\"p\").length > 1, 'You need 2 <code>p</code> elements with Kitty Ipsum text.')"
|
||||
"text": "You need 2 <code>p</code> elements with Kitty Ipsum text.",
|
||||
"testString": "assert($(\"p\").length > 1, 'You need 2 <code>p</code> elements with Kitty Ipsum text.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>p</code> elements has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure each of your <code>p</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>p</code> elements has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure each of your <code>p</code> elements has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.'",
|
||||
"testString": "assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.')"
|
||||
"text": "Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.",
|
||||
"testString": "assert.isTrue((/Purr\\s+jump\\s+eat/gi).test($(\"p\").text()), 'Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should have one <code>main</code> element.'",
|
||||
"testString": "assert($('main').length === 1, 'Your code should have one <code>main</code> element.')"
|
||||
"text": "Your code should have one <code>main</code> element.",
|
||||
"testString": "assert($('main').length === 1, 'Your code should have one <code>main</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>main</code> element should have two paragraph elements as children.'",
|
||||
"testString": "assert($(\"main\").children(\"p\").length === 2, 'The <code>main</code> element should have two paragraph elements as children.')"
|
||||
"text": "The <code>main</code> element should have two paragraph elements as children.",
|
||||
"testString": "assert($(\"main\").children(\"p\").length === 2, 'The <code>main</code> element should have two paragraph elements as children.');"
|
||||
},
|
||||
{
|
||||
"text": "The opening <code>main</code> tag should come before the first paragraph tag.'",
|
||||
"testString": "assert(code.match(/<main>\\s*?<p>/g), 'The opening <code>main</code> tag should come before the first paragraph tag.')"
|
||||
"text": "The opening <code>main</code> tag should come before the first paragraph tag.",
|
||||
"testString": "assert(code.match(/<main>\\s*?<p>/g), 'The opening <code>main</code> tag should come before the first paragraph tag.');"
|
||||
},
|
||||
{
|
||||
"text": "The closing <code>main</code> tag should come after the second closing paragraph tag.'",
|
||||
"testString": "assert(code.match(/<\\/p>\\s*?<\\/main>/g), 'The closing <code>main</code> tag should come after the second closing paragraph tag.')"
|
||||
"text": "The closing <code>main</code> tag should come after the second closing paragraph tag.",
|
||||
"testString": "assert(code.match(/<\\/p>\\s*?<\\/main>/g), 'The closing <code>main</code> tag should come after the second closing paragraph tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -711,16 +711,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your page should have an image element.'",
|
||||
"testString": "assert($(\"img\").length > 0, 'Your page should have an image element.')"
|
||||
"text": "Your page should have an image element.",
|
||||
"testString": "assert($(\"img\").length > 0, 'Your page should have an image element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your image should have a <code>src</code> attribute that points to the kitten image.'",
|
||||
"testString": "assert(new RegExp(\"\\/\\/bit.ly\\/fcc-relaxing-cat|\\/\\/s3.amazonaws.com\\/freecodecamp\\/relaxing-cat.jpg\", 'Your image should have a <code>src</code> attribute that points to the kitten image.')"
|
||||
"text": "Your image should have a <code>src</code> attribute that points to the kitten image.",
|
||||
"testString": "assert(new RegExp(\"\\/\\/bit.ly\\/fcc-relaxing-cat|\\/\\/s3.amazonaws.com\\/freecodecamp\\/relaxing-cat.jpg\", \"gi\").test($(\"img\").attr(\"src\")), 'Your image should have a <code>src</code> attribute that points to the kitten image.');"
|
||||
},
|
||||
{
|
||||
"text": "Your image element <strong>must</strong> have an <code>alt</code> attribute.'",
|
||||
"testString": "assert(code.match(/alt\\s*?=\\s*?(\\\"|\\').*(\\\"|\\')/), 'Your image element <strong>must</strong> have an <code>alt</code> attribute.')"
|
||||
"text": "Your image element <strong>must</strong> have an <code>alt</code> attribute.",
|
||||
"testString": "assert(code.match(/alt\\s*?=\\s*?(\\\"|\\').*(\\\"|\\')/), 'Your image element <strong>must</strong> have an <code>alt</code> attribute.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -814,16 +814,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>a</code> element should have the <code>anchor text</code> of \"cat photos\".'",
|
||||
"testString": "assert((/cat photos/gi).test($(\"a\").text()), 'Your <code>a</code> element should have the <code>anchor text</code> of \"cat photos\".')"
|
||||
"text": "Your <code>a</code> element should have the <code>anchor text</code> of \"cat photos\".",
|
||||
"testString": "assert((/cat photos/gi).test($(\"a\").text()), 'Your <code>a</code> element should have the <code>anchor text</code> of \"cat photos\".');"
|
||||
},
|
||||
{
|
||||
"text": "You need an <code>a</code> element that links to <code>http://freecatphotoapp<wbr>.com</code>'",
|
||||
"testString": "assert(/http:\\/\\/(www\\.)?freecatphotoapp\\.com/gi.test($(\"a\").attr(\"href\")), 'You need an <code>a</code> element that links to <code>http://freecatphotoapp<wbr>.com</code>')"
|
||||
"text": "You need an <code>a</code> element that links to <code>http://freecatphotoapp<wbr>.com</code>",
|
||||
"testString": "assert(/http:\\/\\/(www\\.)?freecatphotoapp\\.com/gi.test($(\"a\").attr(\"href\")), 'You need an <code>a</code> element that links to <code>http://freecatphotoapp<wbr>.com</code>');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>a</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure your <code>a</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>a</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure your <code>a</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -916,28 +916,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "There should be only one anchor tag on your page.'",
|
||||
"testString": "assert($('a').length == 1, 'There should be only one anchor tag on your page.')"
|
||||
"text": "There should be only one anchor tag on your page.",
|
||||
"testString": "assert($('a').length == 1, 'There should be only one anchor tag on your page.');"
|
||||
},
|
||||
{
|
||||
"text": "There should be only one <code>footer</code> tag on your page.'",
|
||||
"testString": "assert($('footer').length == 1, 'There should be only one <code>footer</code> tag on your page.')"
|
||||
"text": "There should be only one <code>footer</code> tag on your page.",
|
||||
"testString": "assert($('footer').length == 1, 'There should be only one <code>footer</code> tag on your page.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>a</code> tag should have an <code>href</code> attribute set to \"#footer\".'",
|
||||
"testString": "assert($('a').eq(0).attr('href') == \"#footer\", 'The <code>a</code> tag should have an <code>href</code> attribute set to \"#footer\".')"
|
||||
"text": "The <code>a</code> tag should have an <code>href</code> attribute set to \"#footer\".",
|
||||
"testString": "assert($('a').eq(0).attr('href') == \"#footer\", 'The <code>a</code> tag should have an <code>href</code> attribute set to \"#footer\".');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>a</code> tag should not have a <code>target</code> attribute'",
|
||||
"testString": "assert(typeof $('a').eq(0).attr('target') == typeof undefined || $('a').eq(0).attr('target') == true, 'The <code>a</code> tag should not have a <code>target</code> attribute')"
|
||||
"text": "The <code>a</code> tag should not have a <code>target</code> attribute",
|
||||
"testString": "assert(typeof $('a').eq(0).attr('target') == typeof undefined || $('a').eq(0).attr('target') == true, 'The <code>a</code> tag should not have a <code>target</code> attribute');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>a</code> text should be \"Jump to Bottom\".'",
|
||||
"testString": "assert($('a').eq(0).text().match(/Jump to Bottom/gi), 'The <code>a</code> text should be \"Jump to Bottom\".')"
|
||||
"text": "The <code>a</code> text should be \"Jump to Bottom\".",
|
||||
"testString": "assert($('a').eq(0).text().match(/Jump to Bottom/gi), 'The <code>a</code> text should be \"Jump to Bottom\".');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>footer</code> tag should have an <code>id</code> attribute set to \"footer\".'",
|
||||
"testString": "assert($('footer').eq(0).attr('id') == \"footer\", 'The <code>footer</code> tag should have an <code>id</code> attribute set to \"footer\".')"
|
||||
"text": "The <code>footer</code> tag should have an <code>id</code> attribute set to \"footer\".",
|
||||
"testString": "assert($('footer').eq(0).attr('id') == \"footer\", 'The <code>footer</code> tag should have an <code>id</code> attribute set to \"footer\".');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1004,36 +1004,36 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "You need an <code>a</code> element that links to \"http://freecatphotoapp.com\".'",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").length > 0 || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").length > 0), 'You need an <code>a</code> element that links to \"http://freecatphotoapp.com\".')"
|
||||
"text": "You need an <code>a</code> element that links to \"http://freecatphotoapp.com\".",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").length > 0 || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").length > 0), 'You need an <code>a</code> element that links to \"http://freecatphotoapp.com\".');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>a</code> element should have the anchor text of \"cat photos\"'",
|
||||
"testString": "assert($(\"a\").text().match(/cat\\sphotos/gi), 'Your <code>a</code> element should have the anchor text of \"cat photos\"')"
|
||||
"text": "Your <code>a</code> element should have the anchor text of \"cat photos\"",
|
||||
"testString": "assert($(\"a\").text().match(/cat\\sphotos/gi), 'Your <code>a</code> element should have the anchor text of \"cat photos\"');"
|
||||
},
|
||||
{
|
||||
"text": "Create a new <code>p</code> element around your <code>a</code> element. There should be at least 3 total <code>p</code> tags in your HTML code.'",
|
||||
"testString": "assert($(\"p\") && $(\"p\").length > 2, 'Create a new <code>p</code> element around your <code>a</code> element. There should be at least 3 total <code>p</code> tags in your HTML code.')"
|
||||
"text": "Create a new <code>p</code> element around your <code>a</code> element. There should be at least 3 total <code>p</code> tags in your HTML code.",
|
||||
"testString": "assert($(\"p\") && $(\"p\").length > 2, 'Create a new <code>p</code> element around your <code>a</code> element. There should be at least 3 total <code>p</code> tags in your HTML code.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>a</code> element should be nested within your new <code>p</code> element.'",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").parent().is(\"p\") || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().is(\"p\")), 'Your <code>a</code> element should be nested within your new <code>p</code> element.')"
|
||||
"text": "Your <code>a</code> element should be nested within your new <code>p</code> element.",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").parent().is(\"p\") || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().is(\"p\")), 'Your <code>a</code> element should be nested within your new <code>p</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>p</code> element should have the text \"View more \" (with a space after it).'",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").parent().text().match(/View\\smore\\s/gi) || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().text().match(/View\\smore\\s/gi)), 'Your <code>p</code> element should have the text \"View more \" (with a space after it).')"
|
||||
"text": "Your <code>p</code> element should have the text \"View more \" (with a space after it).",
|
||||
"testString": "assert(($(\"a[href=\\\"http://freecatphotoapp.com\\\"]\").parent().text().match(/View\\smore\\s/gi) || $(\"a[href=\\\"http://www.freecatphotoapp.com\\\"]\").parent().text().match(/View\\smore\\s/gi)), 'Your <code>p</code> element should have the text \"View more \" (with a space after it).');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>a</code> element should <em>not</em> have the text \"View more\".'",
|
||||
"testString": "assert(!$(\"a\").text().match(/View\\smore/gi), 'Your <code>a</code> element should <em>not</em> have the text \"View more\".')"
|
||||
"text": "Your <code>a</code> element should <em>not</em> have the text \"View more\".",
|
||||
"testString": "assert(!$(\"a\").text().match(/View\\smore/gi), 'Your <code>a</code> element should <em>not</em> have the text \"View more\".');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>p</code> elements has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<p/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure each of your <code>p</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>p</code> elements has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/p>/g) && code.match(/<p/g) && code.match(/<\\/p>/g).length === code.match(/<p/g).length, 'Make sure each of your <code>p</code> elements has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>a</code> elements has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<a/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure each of your <code>a</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>a</code> elements has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<a/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure each of your <code>a</code> elements has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1122,8 +1122,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>a</code> element should be a dead link with the value of the <code>href</code> attribute set to \"#\".'",
|
||||
"testString": "assert($(\"a\").attr(\"href\") === \"#\", 'Your <code>a</code> element should be a dead link with the value of the <code>href</code> attribute set to \"#\".')"
|
||||
"text": "Your <code>a</code> element should be a dead link with the value of the <code>href</code> attribute set to \"#\".",
|
||||
"testString": "assert($(\"a\").attr(\"href\") === \"#\", 'Your <code>a</code> element should be a dead link with the value of the <code>href</code> attribute set to \"#\".');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1201,16 +1201,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Nest the existing <code>img</code> element within an <code>a</code> element.'",
|
||||
"testString": "assert($(\"a\").children(\"img\").length > 0, 'Nest the existing <code>img</code> element within an <code>a</code> element.')"
|
||||
"text": "Nest the existing <code>img</code> element within an <code>a</code> element.",
|
||||
"testString": "assert($(\"a\").children(\"img\").length > 0, 'Nest the existing <code>img</code> element within an <code>a</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>a</code> element should be a dead link with a <code>href</code> attribute set to <code>#</code>.'",
|
||||
"testString": "assert(new RegExp(\"#\").test($(\"a\").children(\"img\").parent().attr(\"href\")), 'Your <code>a</code> element should be a dead link with a <code>href</code> attribute set to <code>#</code>.')"
|
||||
"text": "Your <code>a</code> element should be a dead link with a <code>href</code> attribute set to <code>#</code>.",
|
||||
"testString": "assert(new RegExp(\"#\").test($(\"a\").children(\"img\").parent().attr(\"href\")), 'Your <code>a</code> element should be a dead link with a <code>href</code> attribute set to <code>#</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>a</code> elements has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<a/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure each of your <code>a</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>a</code> elements has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<a/g) && code.match(/<\\/a>/g).length === code.match(/<a/g).length, 'Make sure each of your <code>a</code> elements has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1297,20 +1297,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Create a <code>ul</code> element.'",
|
||||
"testString": "assert($(\"ul\").length > 0, 'Create a <code>ul</code> element.')"
|
||||
"text": "Create a <code>ul</code> element.",
|
||||
"testString": "assert($(\"ul\").length > 0, 'Create a <code>ul</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "You should have three <code>li</code> elements within your <code>ul</code> element.'",
|
||||
"testString": "assert($(\"ul li\").length > 2, 'You should have three <code>li</code> elements within your <code>ul</code> element.')"
|
||||
"text": "You should have three <code>li</code> elements within your <code>ul</code> element.",
|
||||
"testString": "assert($(\"ul li\").length > 2, 'You should have three <code>li</code> elements within your <code>ul</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>ul</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/ul>/gi) && code.match(/<ul/gi) && code.match(/<\\/ul>/gi).length === code.match(/<ul/gi).length, 'Make sure your <code>ul</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>ul</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/ul>/gi) && code.match(/<ul/gi) && code.match(/<\\/ul>/gi).length === code.match(/<ul/gi).length, 'Make sure your <code>ul</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>li</code> elements have closing tags.'",
|
||||
"testString": "assert(code.match(/<\\/li>/gi) && code.match(/<li[\\s>]/gi) && code.match(/<\\/li>/gi).length === code.match(/<li[\\s>]/gi).length, 'Make sure your <code>li</code> elements have closing tags.')"
|
||||
"text": "Make sure your <code>li</code> elements have closing tags.",
|
||||
"testString": "assert(code.match(/<\\/li>/gi) && code.match(/<li[\\s>]/gi) && code.match(/<\\/li>/gi).length === code.match(/<li[\\s>]/gi).length, 'Make sure your <code>li</code> elements have closing tags.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1400,40 +1400,40 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "You should have an ordered list for \"Top 3 things cats hate:\"'",
|
||||
"testString": "assert((/Top 3 things cats hate:/i).test($(\"ol\").prev().text()), 'You should have an ordered list for \"Top 3 things cats hate:\"')"
|
||||
"text": "You should have an ordered list for \"Top 3 things cats hate:\"",
|
||||
"testString": "assert((/Top 3 things cats hate:/i).test($(\"ol\").prev().text()), 'You should have an ordered list for \"Top 3 things cats hate:\"');"
|
||||
},
|
||||
{
|
||||
"text": "You should have an unordered list for \"Things cats love:\"'",
|
||||
"testString": "assert((/Things cats love:/i).test($(\"ul\").prev().text()), 'You should have an unordered list for \"Things cats love:\"')"
|
||||
"text": "You should have an unordered list for \"Things cats love:\"",
|
||||
"testString": "assert((/Things cats love:/i).test($(\"ul\").prev().text()), 'You should have an unordered list for \"Things cats love:\"');"
|
||||
},
|
||||
{
|
||||
"text": "You should have only one <code>ul</code> element.'",
|
||||
"testString": "assert.equal($(\"ul\").length, 'You should have only one <code>ul</code> element.')"
|
||||
"text": "You should have only one <code>ul</code> element.",
|
||||
"testString": "assert.equal($(\"ul\").length, 1, 'You should have only one <code>ul</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "You should have only one <code>ol</code> element.'",
|
||||
"testString": "assert.equal($(\"ol\").length, 'You should have only one <code>ol</code> element.')"
|
||||
"text": "You should have only one <code>ol</code> element.",
|
||||
"testString": "assert.equal($(\"ol\").length, 1, 'You should have only one <code>ol</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "You should have three <code>li</code> elements within your <code>ul</code> element.'",
|
||||
"testString": "assert.equal($(\"ul li\").length, 'You should have three <code>li</code> elements within your <code>ul</code> element.')"
|
||||
"text": "You should have three <code>li</code> elements within your <code>ul</code> element.",
|
||||
"testString": "assert.equal($(\"ul li\").length, 3, 'You should have three <code>li</code> elements within your <code>ul</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "You should have three <code>li</code> elements within your <code>ol</code> element.'",
|
||||
"testString": "assert.equal($(\"ol li\").length, 'You should have three <code>li</code> elements within your <code>ol</code> element.')"
|
||||
"text": "You should have three <code>li</code> elements within your <code>ol</code> element.",
|
||||
"testString": "assert.equal($(\"ol li\").length, 3, 'You should have three <code>li</code> elements within your <code>ol</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>ul</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/ul>/g) && code.match(/<\\/ul>/g).length === code.match(/<ul>/g).length, 'Make sure your <code>ul</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>ul</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/ul>/g) && code.match(/<\\/ul>/g).length === code.match(/<ul>/g).length, 'Make sure your <code>ul</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>ol</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/ol>/g) && code.match(/<\\/ol>/g).length === code.match(/<ol>/g).length, 'Make sure your <code>ol</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>ol</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/ol>/g) && code.match(/<\\/ol>/g).length === code.match(/<ol>/g).length, 'Make sure your <code>ol</code> element has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>li</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/li>/g) && code.match(/<li>/g) && code.match(/<\\/li>/g).length === code.match(/<li>/g).length, 'Make sure your <code>li</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>li</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/li>/g) && code.match(/<li>/g) && code.match(/<\\/li>/g).length === code.match(/<li>/g).length, 'Make sure your <code>li</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1529,8 +1529,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your app should have an <code>input</code> element of type <code>text</code>.'",
|
||||
"testString": "assert($(\"input[type=text]\").length > 0, 'Your app should have an <code>input</code> element of type <code>text</code>.')"
|
||||
"text": "Your app should have an <code>input</code> element of type <code>text</code>.",
|
||||
"testString": "assert($(\"input[type=text]\").length > 0, 'Your app should have an <code>input</code> element of type <code>text</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1630,16 +1630,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Add a <code>placeholder</code> attribute to the existing text <code>input</code> element.'",
|
||||
"testString": "assert($(\"input[placeholder]\").length > 0, 'Add a <code>placeholder</code> attribute to the existing text <code>input</code> element.')"
|
||||
"text": "Add a <code>placeholder</code> attribute to the existing text <code>input</code> element.",
|
||||
"testString": "assert($(\"input[placeholder]\").length > 0, 'Add a <code>placeholder</code> attribute to the existing text <code>input</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Set the value of your placeholder attribute to \"cat photo URL\".'",
|
||||
"testString": "assert($(\"input\") && $(\"input\").attr(\"placeholder\") && $(\"input\").attr(\"placeholder\").match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".')"
|
||||
"text": "Set the value of your placeholder attribute to \"cat photo URL\".",
|
||||
"testString": "assert($(\"input\") && $(\"input\").attr(\"placeholder\") && $(\"input\").attr(\"placeholder\").match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".');"
|
||||
},
|
||||
{
|
||||
"text": "The finished <code>input</code> element should have valid syntax.'",
|
||||
"testString": "assert($(\"input[type=text]\").length > 0 && code.match(/<input((\\s+\\w+(\\s*=\\s*(?:\".*?\"|'.*?'|[\\^'\">\\s]+))?)+\\s*|\\s*)\\/?>/gi), 'The finished <code>input</code> element should have valid syntax.')"
|
||||
"text": "The finished <code>input</code> element should have valid syntax.",
|
||||
"testString": "assert($(\"input[type=text]\").length > 0 && code.match(/<input((\\s+\\w+(\\s*=\\s*(?:\".*?\"|'.*?'|[\\^'\">\\s]+))?)+\\s*|\\s*)\\/?>/gi), 'The finished <code>input</code> element should have valid syntax.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1731,16 +1731,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Nest your text input element within a <code>form</code> element.'",
|
||||
"testString": "assert($(\"form\") && $(\"form\").children(\"input\") && $(\"form\").children(\"input\").length > 0, 'Nest your text input element within a <code>form</code> element.')"
|
||||
"text": "Nest your text input element within a <code>form</code> element.",
|
||||
"testString": "assert($(\"form\") && $(\"form\").children(\"input\") && $(\"form\").children(\"input\").length > 0, 'Nest your text input element within a <code>form</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>'",
|
||||
"testString": "assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\", 'Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>')"
|
||||
"text": "Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>",
|
||||
"testString": "assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\", 'Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>form</code> element has well-formed open and close tags.'",
|
||||
"testString": "assert(code.match(/<\\/form>/g) && code.match(/<form [^<]*>/g) && code.match(/<\\/form>/g).length === code.match(/<form [^<]*>/g).length, 'Make sure your <code>form</code> element has well-formed open and close tags.')"
|
||||
"text": "Make sure your <code>form</code> element has well-formed open and close tags.",
|
||||
"testString": "assert(code.match(/<\\/form>/g) && code.match(/<form [^<]*>/g) && code.match(/<\\/form>/g).length === code.match(/<form [^<]*>/g).length, 'Make sure your <code>form</code> element has well-formed open and close tags.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1831,20 +1831,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your form should have a button inside it.'",
|
||||
"testString": "assert($(\"form\").children(\"button\").length > 0, 'Your form should have a button inside it.')"
|
||||
"text": "Your form should have a button inside it.",
|
||||
"testString": "assert($(\"form\").children(\"button\").length > 0, 'Your form should have a button inside it.');"
|
||||
},
|
||||
{
|
||||
"text": "Your submit button should have the attribute <code>type</code> set to <code>submit</code>.'",
|
||||
"testString": "assert($(\"button\").attr(\"type\") === \"submit\", 'Your submit button should have the attribute <code>type</code> set to <code>submit</code>.')"
|
||||
"text": "Your submit button should have the attribute <code>type</code> set to <code>submit</code>.",
|
||||
"testString": "assert($(\"button\").attr(\"type\") === \"submit\", 'Your submit button should have the attribute <code>type</code> set to <code>submit</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your submit button should only have the text \"Submit\".'",
|
||||
"testString": "assert($(\"button\").text().match(/^\\s*submit\\s*$/gi), 'Your submit button should only have the text \"Submit\".')"
|
||||
"text": "Your submit button should only have the text \"Submit\".",
|
||||
"testString": "assert($(\"button\").text().match(/^\\s*submit\\s*$/gi), 'Your submit button should only have the text \"Submit\".');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>button</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'Make sure your <code>button</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>button</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'Make sure your <code>button</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1938,8 +1938,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your text <code>input</code> element should have the <code>required</code> attribute.'",
|
||||
"testString": "assert($(\"input\").prop(\"required\"), 'Your text <code>input</code> element should have the <code>required</code> attribute.')"
|
||||
"text": "Your text <code>input</code> element should have the <code>required</code> attribute.",
|
||||
"testString": "assert($(\"input\").prop(\"required\"), 'Your text <code>input</code> element should have the <code>required</code> attribute.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2042,32 +2042,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your page should have two radio button elements.'",
|
||||
"testString": "assert($('input[type=\"radio\"]').length > 1, 'Your page should have two radio button elements.')"
|
||||
"text": "Your page should have two radio button elements.",
|
||||
"testString": "assert($('input[type=\"radio\"]').length > 1, 'Your page should have two radio button elements.');"
|
||||
},
|
||||
{
|
||||
"text": "Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.'",
|
||||
"testString": "assert($('label > input[type=\"radio\"]').filter(\"[name='indoor-outdoor']\").length > 1, 'Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.')"
|
||||
"text": "Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.",
|
||||
"testString": "assert($('label > input[type=\"radio\"]').filter(\"[name='indoor-outdoor']\").length > 1, 'Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Each of your two radio button elements should be nested in its own <code>label</code> element.'",
|
||||
"testString": "assert($('label > input[type=\"radio\"]:only-child').length > 1, 'Each of your two radio button elements should be nested in its own <code>label</code> element.')"
|
||||
"text": "Each of your two radio button elements should be nested in its own <code>label</code> element.",
|
||||
"testString": "assert($('label > input[type=\"radio\"]:only-child').length > 1, 'Each of your two radio button elements should be nested in its own <code>label</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>label</code> elements has a closing tag.'",
|
||||
"testString": "assert((code.match(/<\\/label>/g) && code.match(/<label/g) && code.match(/<\\/label>/g).length === code.match(/<label/g).length), 'Make sure each of your <code>label</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>label</code> elements has a closing tag.",
|
||||
"testString": "assert((code.match(/<\\/label>/g) && code.match(/<label/g) && code.match(/<\\/label>/g).length === code.match(/<label/g).length), 'Make sure each of your <code>label</code> elements has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "One of your radio buttons should have the label <code>indoor</code>.'",
|
||||
"testString": "assert($(\"label\").text().match(/indoor/gi), 'One of your radio buttons should have the label <code>indoor</code>.')"
|
||||
"text": "One of your radio buttons should have the label <code>indoor</code>.",
|
||||
"testString": "assert($(\"label\").text().match(/indoor/gi), 'One of your radio buttons should have the label <code>indoor</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "One of your radio buttons should have the label <code>outdoor</code>.'",
|
||||
"testString": "assert($(\"label\").text().match(/outdoor/gi), 'One of your radio buttons should have the label <code>outdoor</code>.')"
|
||||
"text": "One of your radio buttons should have the label <code>outdoor</code>.",
|
||||
"testString": "assert($(\"label\").text().match(/outdoor/gi), 'One of your radio buttons should have the label <code>outdoor</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Each of your radio button elements should be added within the <code>form</code> tag.'",
|
||||
"testString": "assert($(\"label\").parent().get(0).tagName.match('FORM'), 'Each of your radio button elements should be added within the <code>form</code> tag.')"
|
||||
"text": "Each of your radio button elements should be added within the <code>form</code> tag.",
|
||||
"testString": "assert($(\"label\").parent().get(0).tagName.match('FORM'), 'Each of your radio button elements should be added within the <code>form</code> tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2176,20 +2176,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your page should have three checkbox elements.'",
|
||||
"testString": "assert($('input[type=\"checkbox\"]').length > 2, 'Your page should have three checkbox elements.')"
|
||||
"text": "Your page should have three checkbox elements.",
|
||||
"testString": "assert($('input[type=\"checkbox\"]').length > 2, 'Your page should have three checkbox elements.');"
|
||||
},
|
||||
{
|
||||
"text": "Each of your three checkbox elements should be nested in its own <code>label</code> element.'",
|
||||
"testString": "assert($('label > input[type=\"checkbox\"]:only-child').length > 2, 'Each of your three checkbox elements should be nested in its own <code>label</code> element.')"
|
||||
"text": "Each of your three checkbox elements should be nested in its own <code>label</code> element.",
|
||||
"testString": "assert($('label > input[type=\"checkbox\"]:only-child').length > 2, 'Each of your three checkbox elements should be nested in its own <code>label</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure each of your <code>label</code> elements has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/label>/g) && code.match(/<label/g) && code.match(/<\\/label>/g).length === code.match(/<label/g).length, 'Make sure each of your <code>label</code> elements has a closing tag.')"
|
||||
"text": "Make sure each of your <code>label</code> elements has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/label>/g) && code.match(/<label/g) && code.match(/<\\/label>/g).length === code.match(/<label/g).length, 'Make sure each of your <code>label</code> elements has a closing tag.');"
|
||||
},
|
||||
{
|
||||
"text": "Give your checkboxes the <code>name</code> attribute of <code>personality</code>.'",
|
||||
"testString": "assert($('label > input[type=\"checkbox\"]').filter(\"[name='personality']\").length > 2, 'Give your checkboxes the <code>name</code> attribute of <code>personality</code>.')"
|
||||
"text": "Give your checkboxes the <code>name</code> attribute of <code>personality</code>.",
|
||||
"testString": "assert($('label > input[type=\"checkbox\"]').filter(\"[name='personality']\").length > 2, 'Give your checkboxes the <code>name</code> attribute of <code>personality</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2297,12 +2297,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your first radio button on your form should be checked by default.'",
|
||||
"testString": "assert($('input[type=\"radio\"]').prop(\"checked\"), 'Your first radio button on your form should be checked by default.')"
|
||||
"text": "Your first radio button on your form should be checked by default.",
|
||||
"testString": "assert($('input[type=\"radio\"]').prop(\"checked\"), 'Your first radio button on your form should be checked by default.');"
|
||||
},
|
||||
{
|
||||
"text": "Your first checkbox on your form should be checked by default.'",
|
||||
"testString": "assert($('input[type=\"checkbox\"]').prop(\"checked\"), 'Your first checkbox on your form should be checked by default.')"
|
||||
"text": "Your first checkbox on your form should be checked by default.",
|
||||
"testString": "assert($('input[type=\"checkbox\"]').prop(\"checked\"), 'Your first checkbox on your form should be checked by default.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2402,20 +2402,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Nest your <code>p</code> elements inside your <code>div</code> element.'",
|
||||
"testString": "assert($(\"div\").children(\"p\").length > 1, 'Nest your <code>p</code> elements inside your <code>div</code> element.')"
|
||||
"text": "Nest your <code>p</code> elements inside your <code>div</code> element.",
|
||||
"testString": "assert($(\"div\").children(\"p\").length > 1, 'Nest your <code>p</code> elements inside your <code>div</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Nest your <code>ul</code> element inside your <code>div</code> element.'",
|
||||
"testString": "assert($(\"div\").children(\"ul\").length > 0, 'Nest your <code>ul</code> element inside your <code>div</code> element.')"
|
||||
"text": "Nest your <code>ul</code> element inside your <code>div</code> element.",
|
||||
"testString": "assert($(\"div\").children(\"ul\").length > 0, 'Nest your <code>ul</code> element inside your <code>div</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Nest your <code>ol</code> element inside your <code>div</code> element.'",
|
||||
"testString": "assert($(\"div\").children(\"ol\").length > 0, 'Nest your <code>ol</code> element inside your <code>div</code> element.')"
|
||||
"text": "Nest your <code>ol</code> element inside your <code>div</code> element.",
|
||||
"testString": "assert($(\"div\").children(\"ol\").length > 0, 'Nest your <code>ol</code> element inside your <code>div</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "Make sure your <code>div</code> element has a closing tag.'",
|
||||
"testString": "assert(code.match(/<\\/div>/g) && code.match(/<\\/div>/g).length === code.match(/<div>/g).length, 'Make sure your <code>div</code> element has a closing tag.')"
|
||||
"text": "Make sure your <code>div</code> element has a closing tag.",
|
||||
"testString": "assert(code.match(/<\\/div>/g) && code.match(/<\\/div>/g).length === code.match(/<div>/g).length, 'Make sure your <code>div</code> element has a closing tag.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2523,16 +2523,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should include a <code><!DOCTYPE html></code> tag.'",
|
||||
"testString": "assert(code.match(/<!DOCTYPE\\s+?html\\s*?>/gi), 'Your code should include a <code><!DOCTYPE html></code> tag.')"
|
||||
"text": "Your code should include a <code><!DOCTYPE html></code> tag.",
|
||||
"testString": "assert(code.match(/<!DOCTYPE\\s+?html\\s*?>/gi), 'Your code should include a <code><!DOCTYPE html></code> tag.');"
|
||||
},
|
||||
{
|
||||
"text": "There should be one <code>html</code> element.'",
|
||||
"testString": "assert($('html').length == 1, 'There should be one <code>html</code> element.')"
|
||||
"text": "There should be one <code>html</code> element.",
|
||||
"testString": "assert($('html').length == 1, 'There should be one <code>html</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>html</code> tags should wrap around one <code>h1</code> element.'",
|
||||
"testString": "assert(code.match(/<html>\\s*?<h1>\\s*?.*?\\s*?<\\/h1>\\s*?<\\/html>/gi), 'The <code>html</code> tags should wrap around one <code>h1</code> element.')"
|
||||
"text": "The <code>html</code> tags should wrap around one <code>h1</code> element.",
|
||||
"testString": "assert(code.match(/<html>\\s*?<h1>\\s*?.*?\\s*?<\\/h1>\\s*?<\\/html>/gi), 'The <code>html</code> tags should wrap around one <code>h1</code> element.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -2581,28 +2581,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "There should be only one <code>head</code> element on the page.'",
|
||||
"testString": "assert($('head').length == 1, 'There should be only one <code>head</code> element on the page.')"
|
||||
"text": "There should be only one <code>head</code> element on the page.",
|
||||
"testString": "assert($('head').length == 1, 'There should be only one <code>head</code> element on the page.');"
|
||||
},
|
||||
{
|
||||
"text": "There should be only one <code>body</code> element on the page.'",
|
||||
"testString": "assert($('body').length == 1, 'There should be only one <code>body</code> element on the page.')"
|
||||
"text": "There should be only one <code>body</code> element on the page.",
|
||||
"testString": "assert($('body').length == 1, 'There should be only one <code>body</code> element on the page.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>head</code> element should be a child of the <code>html</code> element.'",
|
||||
"testString": "assert($('html').children('head').length == 1, 'The <code>head</code> element should be a child of the <code>html</code> element.')"
|
||||
"text": "The <code>head</code> element should be a child of the <code>html</code> element.",
|
||||
"testString": "assert($('html').children('head').length == 1, 'The <code>head</code> element should be a child of the <code>html</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>body</code> element should be a child of the <code>html</code> element.'",
|
||||
"testString": "assert($('html').children('body').length == 1, 'The <code>body</code> element should be a child of the <code>html</code> element.')"
|
||||
"text": "The <code>body</code> element should be a child of the <code>html</code> element.",
|
||||
"testString": "assert($('html').children('body').length == 1, 'The <code>body</code> element should be a child of the <code>html</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>head</code> element should wrap around the <code>title</code> element.'",
|
||||
"testString": "assert(code.match(/<head>\\s*?<title>\\s*?.*?\\s*?<\\/title>\\s*?<\\/head>/gi), 'The <code>head</code> element should wrap around the <code>title</code> element.')"
|
||||
"text": "The <code>head</code> element should wrap around the <code>title</code> element.",
|
||||
"testString": "assert(code.match(/<head>\\s*?<title>\\s*?.*?\\s*?<\\/title>\\s*?<\\/head>/gi), 'The <code>head</code> element should wrap around the <code>title</code> element.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.'",
|
||||
"testString": "assert($('body').children('h1').length == 1 && $('body').children('p').length == 1, 'The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.')"
|
||||
"text": "The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.",
|
||||
"testString": "assert($('body').children('h1').length == 1 && $('body').children('p').length == 1, 'The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
|
@ -15,8 +15,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>#box-container</code> should have the <code>display</code> property set to a value of flex.'",
|
||||
"testString": "assert($('#box-container').css('display') == 'flex', '<code>#box-container</code> should have the <code>display</code> property set to a value of flex.')"
|
||||
"text": "<code>#box-container</code> should have the <code>display</code> property set to a value of flex.",
|
||||
"testString": "assert($('#box-container').css('display') == 'flex', '<code>#box-container</code> should have the <code>display</code> property set to a value of flex.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -72,32 +72,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>header</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('header').css('display') == 'flex', 'Your <code>header</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>header</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('header').css('display') == 'flex', 'Your <code>header</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>footer</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('footer').css('display') == 'flex', 'Your <code>footer</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>footer</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('footer').css('display') == 'flex', 'Your <code>footer</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>h3</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('h3').css('display') == 'flex', 'Your <code>h3</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>h3</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('h3').css('display') == 'flex', 'Your <code>h3</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>h4</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('h4').css('display') == 'flex', 'Your <code>h4</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>h4</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('h4').css('display') == 'flex', 'Your <code>h4</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>.profile-name</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('.profile-name').css('display') == 'flex', 'Your <code>.profile-name</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>.profile-name</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('.profile-name').css('display') == 'flex', 'Your <code>.profile-name</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>.follow-btn</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('.follow-btn').css('display') == 'flex', 'Your <code>.follow-btn</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>.follow-btn</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('.follow-btn').css('display') == 'flex', 'Your <code>.follow-btn</code> should have a <code>display</code> property set to flex.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>.stats</code> should have a <code>display</code> property set to flex.'",
|
||||
"testString": "assert($('.stats').css('display') == 'flex', 'Your <code>.stats</code> should have a <code>display</code> property set to flex.')"
|
||||
"text": "Your <code>.stats</code> should have a <code>display</code> property set to flex.",
|
||||
"testString": "assert($('.stats').css('display') == 'flex', 'Your <code>.stats</code> should have a <code>display</code> property set to flex.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -219,8 +219,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.'",
|
||||
"testString": "assert($('#box-container').css('flex-direction') == 'row-reverse', 'The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.')"
|
||||
"text": "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.",
|
||||
"testString": "assert($('#box-container').css('flex-direction') == 'row-reverse', 'The <code>#box-container</code> element should have a <code>flex-direction</code> property set to row-reverse.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -274,12 +274,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>header</code> should have a <code>flex-direction</code> property set to row.'",
|
||||
"testString": "assert(code.match(/header\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-direction:\\s*?row;/g), 'The <code>header</code> should have a <code>flex-direction</code> property set to row.')"
|
||||
"text": "The <code>header</code> should have a <code>flex-direction</code> property set to row.",
|
||||
"testString": "assert(code.match(/header\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-direction:\\s*?row;/g), 'The <code>header</code> should have a <code>flex-direction</code> property set to row.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>footer</code> should have a <code>flex-direction</code> property set to row.'",
|
||||
"testString": "assert(code.match(/footer\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-direction:\\s*?row;/g), 'The <code>footer</code> should have a <code>flex-direction</code> property set to row.')"
|
||||
"text": "The <code>footer</code> should have a <code>flex-direction</code> property set to row.",
|
||||
"testString": "assert(code.match(/footer\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-direction:\\s*?row;/g), 'The <code>footer</code> should have a <code>flex-direction</code> property set to row.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -401,8 +401,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to column.'",
|
||||
"testString": "assert($('#box-container').css('flex-direction') == 'column', 'The <code>#box-container</code> element should have a <code>flex-direction</code> property set to column.')"
|
||||
"text": "The <code>#box-container</code> element should have a <code>flex-direction</code> property set to column.",
|
||||
"testString": "assert($('#box-container').css('flex-direction') == 'column', 'The <code>#box-container</code> element should have a <code>flex-direction</code> property set to column.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -456,8 +456,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>.profile-name</code> element should have a <code>flex-direction</code> property set to column.'",
|
||||
"testString": "assert($('.profile-name').css('flex-direction') == 'column', 'The <code>.profile-name</code> element should have a <code>flex-direction</code> property set to column.')"
|
||||
"text": "The <code>.profile-name</code> element should have a <code>flex-direction</code> property set to column.",
|
||||
"testString": "assert($('.profile-name').css('flex-direction') == 'column', 'The <code>.profile-name</code> element should have a <code>flex-direction</code> property set to column.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -581,8 +581,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-container</code> element should have a <code>justify-content</code> property set to a value of center.'",
|
||||
"testString": "assert($('#box-container').css('justify-content') == 'center', 'The <code>#box-container</code> element should have a <code>justify-content</code> property set to a value of center.')"
|
||||
"text": "The <code>#box-container</code> element should have a <code>justify-content</code> property set to a value of center.",
|
||||
"testString": "assert($('#box-container').css('justify-content') == 'center', 'The <code>#box-container</code> element should have a <code>justify-content</code> property set to a value of center.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -637,8 +637,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>.profile-name</code> element should have the <code>justify-content</code> property set to any of these values: center, flex-start, flex-end, space-between, or space-around.'",
|
||||
"testString": "assert(code.match(/header\\s.profile-name\\s*{\\s*?.*?\\s*?.*?\\s*?\\s*?.*?\\s*?justify-content\\s*:\\s*(center|flex-start|flex-end|space-between|space-around)\\s*;/g), 'The <code>.profile-name</code> element should have the <code>justify-content</code> property set to any of these values: center, flex-start, flex-end, space-between, or space-around.')"
|
||||
"text": "The <code>.profile-name</code> element should have the <code>justify-content</code> property set to any of these values: center, flex-start, flex-end, space-between, or space-around.",
|
||||
"testString": "assert(code.match(/header\\s.profile-name\\s*{\\s*?.*?\\s*?.*?\\s*?\\s*?.*?\\s*?justify-content\\s*:\\s*(center|flex-start|flex-end|space-between|space-around)\\s*;/g), 'The <code>.profile-name</code> element should have the <code>justify-content</code> property set to any of these values: center, flex-start, flex-end, space-between, or space-around.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -763,8 +763,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-container</code> element should have an <code>align-items</code> property set to a value of center.'",
|
||||
"testString": "assert($('#box-container').css('align-items') == 'center', 'The <code>#box-container</code> element should have an <code>align-items</code> property set to a value of center.')"
|
||||
"text": "The <code>#box-container</code> element should have an <code>align-items</code> property set to a value of center.",
|
||||
"testString": "assert($('#box-container').css('align-items') == 'center', 'The <code>#box-container</code> element should have an <code>align-items</code> property set to a value of center.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -819,16 +819,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>.follow-btn</code> element should have the <code>align-items</code> property set to a value of center.'",
|
||||
"testString": "assert($('.follow-btn').css('align-items') == 'center', 'The <code>.follow-btn</code> element should have the <code>align-items</code> property set to a value of center.')"
|
||||
"text": "The <code>.follow-btn</code> element should have the <code>align-items</code> property set to a value of center.",
|
||||
"testString": "assert($('.follow-btn').css('align-items') == 'center', 'The <code>.follow-btn</code> element should have the <code>align-items</code> property set to a value of center.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>h3</code> element should have the <code>align-items</code> property set to a value of center.'",
|
||||
"testString": "assert($('h3').css('align-items') == 'center', 'The <code>h3</code> element should have the <code>align-items</code> property set to a value of center.')"
|
||||
"text": "The <code>h3</code> element should have the <code>align-items</code> property set to a value of center.",
|
||||
"testString": "assert($('h3').css('align-items') == 'center', 'The <code>h3</code> element should have the <code>align-items</code> property set to a value of center.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>h4</code> element should have the <code>align-items</code> property set to a value of center.'",
|
||||
"testString": "assert($('h4').css('align-items') == 'center', 'The <code>h4</code> element should have the <code>align-items</code> property set to a value of center.')"
|
||||
"text": "The <code>h4</code> element should have the <code>align-items</code> property set to a value of center.",
|
||||
"testString": "assert($('h4').css('align-items') == 'center', 'The <code>h4</code> element should have the <code>align-items</code> property set to a value of center.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -953,8 +953,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-container</code> element should have the <code>flex-wrap</code> property set to a value of wrap.'",
|
||||
"testString": "assert($('#box-container').css('flex-wrap') == 'wrap', 'The <code>#box-container</code> element should have the <code>flex-wrap</code> property set to a value of wrap.')"
|
||||
"text": "The <code>#box-container</code> element should have the <code>flex-wrap</code> property set to a value of wrap.",
|
||||
"testString": "assert($('#box-container').css('flex-wrap') == 'wrap', 'The <code>#box-container</code> element should have the <code>flex-wrap</code> property set to a value of wrap.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1035,12 +1035,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex-shrink</code> property set to a value of 1.'",
|
||||
"testString": "assert($('#box-1').css('flex-shrink') == '1', 'The <code>#box-1</code> element should have the <code>flex-shrink</code> property set to a value of 1.')"
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex-shrink</code> property set to a value of 1.",
|
||||
"testString": "assert($('#box-1').css('flex-shrink') == '1', 'The <code>#box-1</code> element should have the <code>flex-shrink</code> property set to a value of 1.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-shrink</code> property set to a value of 2.'",
|
||||
"testString": "assert($('#box-2').css('flex-shrink') == '2', 'The <code>#box-2</code> element should have the <code>flex-shrink</code> property set to a value of 2.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-shrink</code> property set to a value of 2.",
|
||||
"testString": "assert($('#box-2').css('flex-shrink') == '2', 'The <code>#box-2</code> element should have the <code>flex-shrink</code> property set to a value of 2.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1096,12 +1096,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex-grow</code> property set to a value of 1.'",
|
||||
"testString": "assert($('#box-1').css('flex-grow') == '1', 'The <code>#box-1</code> element should have the <code>flex-grow</code> property set to a value of 1.')"
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex-grow</code> property set to a value of 1.",
|
||||
"testString": "assert($('#box-1').css('flex-grow') == '1', 'The <code>#box-1</code> element should have the <code>flex-grow</code> property set to a value of 1.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-grow</code> property set to a value of 2.'",
|
||||
"testString": "assert($('#box-2').css('flex-grow') == '2', 'The <code>#box-2</code> element should have the <code>flex-grow</code> property set to a value of 2.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-grow</code> property set to a value of 2.",
|
||||
"testString": "assert($('#box-2').css('flex-grow') == '2', 'The <code>#box-2</code> element should have the <code>flex-grow</code> property set to a value of 2.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1156,20 +1156,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have a <code>flex-basis</code> property.'",
|
||||
"testString": "assert($('#box-1').css('flex-basis') != 'auto', 'The <code>#box-1</code> element should have a <code>flex-basis</code> property.')"
|
||||
"text": "The <code>#box-1</code> element should have a <code>flex-basis</code> property.",
|
||||
"testString": "assert($('#box-1').css('flex-basis') != 'auto', 'The <code>#box-1</code> element should have a <code>flex-basis</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have a <code>flex-basis</code> value of <code>10em</code>.'",
|
||||
"testString": "assert(code.match(/#box-1\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-basis:\\s*?10em;/g), 'The <code>#box-1</code> element should have a <code>flex-basis</code> value of <code>10em</code>.')"
|
||||
"text": "The <code>#box-1</code> element should have a <code>flex-basis</code> value of <code>10em</code>.",
|
||||
"testString": "assert(code.match(/#box-1\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-basis:\\s*?10em;/g), 'The <code>#box-1</code> element should have a <code>flex-basis</code> value of <code>10em</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-basis</code> property.'",
|
||||
"testString": "assert($('#box-2').css('flex-basis') != 'auto', 'The <code>#box-2</code> element should have the <code>flex-basis</code> property.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex-basis</code> property.",
|
||||
"testString": "assert($('#box-2').css('flex-basis') != 'auto', 'The <code>#box-2</code> element should have the <code>flex-basis</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have a <code>flex-basis</code> value of <code>20em</code>.'",
|
||||
"testString": "assert(code.match(/#box-2\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-basis:\\s*?20em;/g), 'The <code>#box-2</code> element should have a <code>flex-basis</code> value of <code>20em</code>.')"
|
||||
"text": "The <code>#box-2</code> element should have a <code>flex-basis</code> value of <code>20em</code>.",
|
||||
"testString": "assert(code.match(/#box-2\\s*?{\\s*?.*?\\s*?.*?\\s*?flex-basis:\\s*?20em;/g), 'The <code>#box-2</code> element should have a <code>flex-basis</code> value of <code>20em</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1226,16 +1226,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex</code> property set to a value of 2 2 150px.'",
|
||||
"testString": "assert($('#box-1').css('flex-grow') == '2' && $('#box-1').css('flex-shrink') == '2' && $('#box-1').css('flex-basis') == '150px', 'The <code>#box-1</code> element should have the <code>flex</code> property set to a value of 2 2 150px.')"
|
||||
"text": "The <code>#box-1</code> element should have the <code>flex</code> property set to a value of 2 2 150px.",
|
||||
"testString": "assert($('#box-1').css('flex-grow') == '2' && $('#box-1').css('flex-shrink') == '2' && $('#box-1').css('flex-basis') == '150px', 'The <code>#box-1</code> element should have the <code>flex</code> property set to a value of 2 2 150px.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex</code> property set to a value of 1 1 150px.'",
|
||||
"testString": "assert($('#box-2').css('flex-grow') == '1' && $('#box-2').css('flex-shrink') == '1' && $('#box-2').css('flex-basis') == '150px', 'The <code>#box-2</code> element should have the <code>flex</code> property set to a value of 1 1 150px.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>flex</code> property set to a value of 1 1 150px.",
|
||||
"testString": "assert($('#box-2').css('flex-grow') == '1' && $('#box-2').css('flex-shrink') == '1' && $('#box-2').css('flex-basis') == '150px', 'The <code>#box-2</code> element should have the <code>flex</code> property set to a value of 1 1 150px.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>flex</code> property for <code>#box-1</code> and <code>#box-2</code>.'",
|
||||
"testString": "assert(code.match(/flex:\\s*?\\d\\s+?\\d\\s+?150px;/g).length == 2, 'Your code should use the <code>flex</code> property for <code>#box-1</code> and <code>#box-2</code>.')"
|
||||
"text": "Your code should use the <code>flex</code> property for <code>#box-1</code> and <code>#box-2</code>.",
|
||||
"testString": "assert(code.match(/flex:\\s*?\\d\\s+?\\d\\s+?150px;/g).length == 2, 'Your code should use the <code>flex</code> property for <code>#box-1</code> and <code>#box-2</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1288,12 +1288,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.'",
|
||||
"testString": "assert($('#box-1').css('order') == '2', 'The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.')"
|
||||
"text": "The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.",
|
||||
"testString": "assert($('#box-1').css('order') == '2', 'The <code>#box-1</code> element should have the <code>order</code> property set to a value of 2.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.'",
|
||||
"testString": "assert($('#box-2').css('order') == '1', 'The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.",
|
||||
"testString": "assert($('#box-2').css('order') == '1', 'The <code>#box-2</code> element should have the <code>order</code> property set to a value of 1.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1349,12 +1349,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>#box-1</code> element should have the <code>align-self</code> property set to a value of center.'",
|
||||
"testString": "assert($('#box-1').css('align-self') == 'center', 'The <code>#box-1</code> element should have the <code>align-self</code> property set to a value of center.')"
|
||||
"text": "The <code>#box-1</code> element should have the <code>align-self</code> property set to a value of center.",
|
||||
"testString": "assert($('#box-1').css('align-self') == 'center', 'The <code>#box-1</code> element should have the <code>align-self</code> property set to a value of center.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>#box-2</code> element should have the <code>align-self</code> property set to a value of flex-end.'",
|
||||
"testString": "assert($('#box-2').css('align-self') == 'flex-end', 'The <code>#box-2</code> element should have the <code>align-self</code> property set to a value of flex-end.')"
|
||||
"text": "The <code>#box-2</code> element should have the <code>align-self</code> property set to a value of flex-end.",
|
||||
"testString": "assert($('#box-2').css('align-self') == 'flex-end', 'The <code>#box-2</code> element should have the <code>align-self</code> property set to a value of flex-end.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
@ -15,8 +15,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>display</code> property with a value of <code>grid</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*display\\s*?:\\s*?grid\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>display</code> property with a value of <code>grid</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>display</code> property with a value of <code>grid</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*display\\s*?:\\s*?grid\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>display</code> property with a value of <code>grid</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -75,8 +75,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property with three units of <code>100px</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?100px\\s*?100px\\s*?100px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property with three units of <code>100px</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property with three units of <code>100px</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?100px\\s*?100px\\s*?100px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property with three units of <code>100px</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -133,8 +133,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-rows</code> property with two units of <code>50px</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-rows\\s*?:\\s*?50px\\s*?50px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-rows</code> property with two units of <code>50px</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-rows</code> property with two units of <code>50px</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-rows\\s*?:\\s*?50px\\s*?50px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-rows</code> property with two units of <code>50px</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -198,8 +198,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that has three columns with the following widths: <code>1fr, 100px, and 2fr</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?1fr\\s*?100px\\s*?2fr\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property that has three columns with the following widths: <code>1fr, 100px, and 2fr</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that has three columns with the following widths: <code>1fr, 100px, and 2fr</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?1fr\\s*?100px\\s*?2fr\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property that has three columns with the following widths: <code>1fr, 100px, and 2fr</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -260,8 +260,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-column-gap</code> property that has the value of <code>20px</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-column-gap\\s*?:\\s*?20px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-column-gap</code> property that has the value of <code>20px</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-column-gap</code> property that has the value of <code>20px</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-column-gap\\s*?:\\s*?20px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-column-gap</code> property that has the value of <code>20px</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -321,8 +321,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-row-gap</code> property that has the value of <code>5px</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-row-gap\\s*?:\\s*?5px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-row-gap</code> property that has the value of <code>5px</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-row-gap</code> property that has the value of <code>5px</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-row-gap\\s*?:\\s*?5px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-row-gap</code> property that has the value of <code>5px</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -382,8 +382,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-gap</code> property that introduces <code>10px</code> gap between the rows and <code>20px</code> gap between the columns.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-gap\\s*?:\\s*?10px\\s*?20px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-gap</code> property that introduces <code>10px</code> gap between the rows and <code>20px</code> gap between the columns.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-gap</code> property that introduces <code>10px</code> gap between the rows and <code>20px</code> gap between the columns.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-gap\\s*?:\\s*?10px\\s*?20px\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-gap</code> property that introduces <code>10px</code> gap between the rows and <code>20px</code> gap between the columns.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -447,8 +447,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item5</code> class should have a <code>grid-column</code> property that has the value of <code>2 / 4</code>.'",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-column\\s*?:\\s*?2\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-column</code> property that has the value of <code>2 / 4</code>.')"
|
||||
"text": "<code>item5</code> class should have a <code>grid-column</code> property that has the value of <code>2 / 4</code>.",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-column\\s*?:\\s*?2\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-column</code> property that has the value of <code>2 / 4</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -512,8 +512,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item5</code> class should have a <code>grid-row</code> property that has the value of <code>2 / 4</code>.'",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-row\\s*?:\\s*?2\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-row</code> property that has the value of <code>2 / 4</code>.')"
|
||||
"text": "<code>item5</code> class should have a <code>grid-row</code> property that has the value of <code>2 / 4</code>.",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-row\\s*?:\\s*?2\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-row</code> property that has the value of <code>2 / 4</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -581,8 +581,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item2</code> class should have a <code>justify-self</code> property that has the value of <code>center</code>.'",
|
||||
"testString": "assert(code.match(/.item2\\s*?{[\\s\\S]*justify-self\\s*?:\\s*?center\\s*?;[\\s\\S]*}/gi), '<code>item2</code> class should have a <code>justify-self</code> property that has the value of <code>center</code>.')"
|
||||
"text": "<code>item2</code> class should have a <code>justify-self</code> property that has the value of <code>center</code>.",
|
||||
"testString": "assert(code.match(/.item2\\s*?{[\\s\\S]*justify-self\\s*?:\\s*?center\\s*?;[\\s\\S]*}/gi), '<code>item2</code> class should have a <code>justify-self</code> property that has the value of <code>center</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -647,8 +647,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item3</code> class should have a <code>align-self</code> property that has the value of <code>end</code>.'",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*align-self\\s*?:\\s*?end\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>align-self</code> property that has the value of <code>end</code>.')"
|
||||
"text": "<code>item3</code> class should have a <code>align-self</code> property that has the value of <code>end</code>.",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*align-self\\s*?:\\s*?end\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>align-self</code> property that has the value of <code>end</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -713,8 +713,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>justify-items</code> property that has the value of <code>center</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*justify-items\\s*?:\\s*?center\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>justify-items</code> property that has the value of <code>center</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>justify-items</code> property that has the value of <code>center</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*justify-items\\s*?:\\s*?center\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>justify-items</code> property that has the value of <code>center</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -775,8 +775,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>align-items</code> property that has the value of <code>end</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*align-items\\s*?:\\s*?end\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>align-items</code> property that has the value of <code>end</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>align-items</code> property that has the value of <code>end</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*align-items\\s*?:\\s*?end\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>align-items</code> property that has the value of <code>end</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -841,8 +841,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-areas</code> propertiy similar to the preview but has <code>.</code> instead of the <code>advert</code> area.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-areas\\s*?:\\s*?\"\\s*?header\\s*?header\\s*?header\\s*?\"\\s*?\"\\s*?.\\s*?content\\s*?content\\s*?\"\\s*?\"\\s*?footer\\s*?footer\\s*?footer\\s*?\"\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-areas</code> propertiy similar to the preview but has <code>.</code> instead of the <code>advert</code> area.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-areas</code> propertiy similar to the preview but has <code>.</code> instead of the <code>advert</code> area.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-areas\\s*?:\\s*?\"\\s*?header\\s*?header\\s*?header\\s*?\"\\s*?\"\\s*?.\\s*?content\\s*?content\\s*?\"\\s*?\"\\s*?footer\\s*?footer\\s*?footer\\s*?\"\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-areas</code> propertiy similar to the preview but has <code>.</code> instead of the <code>advert</code> area.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -908,8 +908,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>footer</code>.'",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-area\\s*?:\\s*?footer\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>footer</code>.')"
|
||||
"text": "<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>footer</code>.",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-area\\s*?:\\s*?footer\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>footer</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -981,8 +981,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>3/1/4/4</code>.'",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-area\\s*?:\\s*?3\\s*?\\/\\s*?1\\s*?\\/\\s*?4\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>3/1/4/4</code>.')"
|
||||
"text": "<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>3/1/4/4</code>.",
|
||||
"testString": "assert(code.match(/.item5\\s*?{[\\s\\S]*grid-area\\s*?:\\s*?3\\s*?\\/\\s*?1\\s*?\\/\\s*?4\\s*?\\/\\s*?4\\s*?;[\\s\\S]*}/gi), '<code>item5</code> class should have a <code>grid-area</code> property that has the value of <code>3/1/4/4</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1054,8 +1054,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the width of <code>1fr</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?3\\s*?, '<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the width of <code>1fr</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the width of <code>1fr</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?3\\s*?,\\s*?1fr\\s*?\\)\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the width of <code>1fr</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1118,8 +1118,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the minimum width of <code>90px</code> and maximum width of <code>1fr</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?3\\s*?, '<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the minimum width of <code>90px</code> and maximum width of <code>1fr</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the minimum width of <code>90px</code> and maximum width of <code>1fr</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?3\\s*?,\\s*?minmax\\s*?\\(\\s*?90px\\s*?,\\s*?1fr\\s*?\\)\\s*?\\)\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property that is set to repeat 3 columns with the minimum width of <code>90px</code> and maximum width of <code>1fr</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1184,8 +1184,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fill</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?auto-fill\\s*?, '<code>container</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fill</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.')"
|
||||
"text": "<code>container</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fill</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?auto-fill\\s*?,\\s*?minmax\\s*?\\(\\s*?60px\\s*?,\\s*?1fr\\s*?\\)\\s*?\\)\\s*?;[\\s\\S]*}/gi), '<code>container</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fill</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1264,8 +1264,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>container2</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fit</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.'",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?auto-fit\\s*?, '<code>container2</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fit</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.')"
|
||||
"text": "<code>container2</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fit</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.",
|
||||
"testString": "assert(code.match(/.container\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?repeat\\s*?\\(\\s*?auto-fit\\s*?,\\s*?minmax\\s*?\\(\\s*?60px\\s*?,\\s*?1fr\\s*?\\)\\s*?\\)\\s*?;[\\s\\S]*}/gi), '<code>container2</code> class should have a <code>grid-template-columns</code> property with <code>repeat</code> and <code>auto-fit</code> that will fill the grid with columns that have a minimum width of <code>60px</code> and maximum of <code>1fr</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1345,8 +1345,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "When the viewport is <code>400px</code> or more, <code>container</code> class should have a <code>grid-template-columns</code> property in which the footer and header areas occupy the top and bottom rows respectively and advert and content occupy the left and right columns of the middle row.'",
|
||||
"testString": "assert(code.match(/@media\\s*?\\(\\s*?min-width\\s*?:\\s*?400px\\s*?\\)[\\s\\S]*.container\\s*?{[\\s\\S]*grid-template-areas\\s*?:\\s*?\"\\s*?header\\s*?header\\s*?\"\\s*?\"\\s*?advert\\s*?content\\s*?\"\\s*?\"\\s*?footer\\s*?footer\\s*?\"\\s*?;[\\s\\S]*}/gi), 'When the viewport is <code>400px</code> or more, <code>container</code> class should have a <code>grid-template-columns</code> property in which the footer and header areas occupy the top and bottom rows respectively and advert and content occupy the left and right columns of the middle row.')"
|
||||
"text": "When the viewport is <code>400px</code> or more, <code>container</code> class should have a <code>grid-template-columns</code> property in which the footer and header areas occupy the top and bottom rows respectively and advert and content occupy the left and right columns of the middle row.",
|
||||
"testString": "assert(code.match(/@media\\s*?\\(\\s*?min-width\\s*?:\\s*?400px\\s*?\\)[\\s\\S]*.container\\s*?{[\\s\\S]*grid-template-areas\\s*?:\\s*?\"\\s*?header\\s*?header\\s*?\"\\s*?\"\\s*?advert\\s*?content\\s*?\"\\s*?\"\\s*?footer\\s*?footer\\s*?\"\\s*?;[\\s\\S]*}/gi), 'When the viewport is <code>400px</code> or more, <code>container</code> class should have a <code>grid-template-columns</code> property in which the footer and header areas occupy the top and bottom rows respectively and advert and content occupy the left and right columns of the middle row.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1446,12 +1446,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>item3</code> class should have a <code>grid-template-columns</code> property with <code>auto</code> and <code>1fr</code> as values.'",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?auto\\s*?1fr\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>grid-template-columns</code> property with <code>auto</code> and <code>1fr</code> as values.')"
|
||||
"text": "<code>item3</code> class should have a <code>grid-template-columns</code> property with <code>auto</code> and <code>1fr</code> as values.",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*grid-template-columns\\s*?:\\s*?auto\\s*?1fr\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>grid-template-columns</code> property with <code>auto</code> and <code>1fr</code> as values.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>item3</code> class should have a <code>display</code> property with the value of <code>grid</code>.'",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*display\\s*?:\\s*?grid\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>display</code> property with the value of <code>grid</code>.')"
|
||||
"text": "<code>item3</code> class should have a <code>display</code> property with the value of <code>grid</code>.",
|
||||
"testString": "assert(code.match(/.item3\\s*?{[\\s\\S]*display\\s*?:\\s*?grid\\s*?;[\\s\\S]*}/gi), '<code>item3</code> class should have a <code>display</code> property with the value of <code>grid</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
@ -20,12 +20,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.'",
|
||||
"testString": "assert($('p').css('font-size') == '10px', 'Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.')"
|
||||
"text": "Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.",
|
||||
"testString": "assert($('p').css('font-size') == '10px', 'Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.');"
|
||||
},
|
||||
{
|
||||
"text": "Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.'",
|
||||
"testString": "assert(code.match(/@media\\s?\\(max-height:\\s*?800px\\)/g), 'Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.')"
|
||||
"text": "Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.",
|
||||
"testString": "assert(code.match(/@media\\s?\\(max-height:\\s*?800px\\)/g), 'Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -83,16 +83,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have a <code>max-width</code> set to 100%.'",
|
||||
"testString": "assert(code.match(/max-width:\\s*?100%;/g), 'Your <code>img</code> tag should have a <code>max-width</code> set to 100%.')"
|
||||
"text": "Your <code>img</code> tag should have a <code>max-width</code> set to 100%.",
|
||||
"testString": "assert(code.match(/max-width:\\s*?100%;/g), 'Your <code>img</code> tag should have a <code>max-width</code> set to 100%.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have a <code>display</code> set to block.'",
|
||||
"testString": "assert($('img').css('display') == 'block', 'Your <code>img</code> tag should have a <code>display</code> set to block.')"
|
||||
"text": "Your <code>img</code> tag should have a <code>display</code> set to block.",
|
||||
"testString": "assert($('img').css('display') == 'block', 'Your <code>img</code> tag should have a <code>display</code> set to block.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have a <code>height</code> set to auto.'",
|
||||
"testString": "assert(code.match(/height:\\s*?auto;/g), 'Your <code>img</code> tag should have a <code>height</code> set to auto.')"
|
||||
"text": "Your <code>img</code> tag should have a <code>height</code> set to auto.",
|
||||
"testString": "assert(code.match(/height:\\s*?auto;/g), 'Your <code>img</code> tag should have a <code>height</code> set to auto.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -143,12 +143,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have a <code>width</code> of 100 pixels.'",
|
||||
"testString": "assert($('img').css('width') == '100px', 'Your <code>img</code> tag should have a <code>width</code> of 100 pixels.')"
|
||||
"text": "Your <code>img</code> tag should have a <code>width</code> of 100 pixels.",
|
||||
"testString": "assert($('img').css('width') == '100px', 'Your <code>img</code> tag should have a <code>width</code> of 100 pixels.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>img</code> tag should have a <code>height</code> of 100 pixels.'",
|
||||
"testString": "assert($('img').css('height') == '100px', 'Your <code>img</code> tag should have a <code>height</code> of 100 pixels.')"
|
||||
"text": "Your <code>img</code> tag should have a <code>height</code> of 100 pixels.",
|
||||
"testString": "assert($('img').css('height') == '100px', 'Your <code>img</code> tag should have a <code>height</code> of 100 pixels.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -197,12 +197,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your <code>h2</code> tag should have a <code>width</code> of 80vw.'",
|
||||
"testString": "assert(code.match(/h2\\s*?{\\s*?width:\\s*?80vw;\\s*?}/g), 'Your <code>h2</code> tag should have a <code>width</code> of 80vw.')"
|
||||
"text": "Your <code>h2</code> tag should have a <code>width</code> of 80vw.",
|
||||
"testString": "assert(code.match(/h2\\s*?{\\s*?width:\\s*?80vw;\\s*?}/g), 'Your <code>h2</code> tag should have a <code>width</code> of 80vw.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>p</code> tag should have a <code>width</code> of 75vmin.'",
|
||||
"testString": "assert(code.match(/p\\s*?{\\s*?width:\\s*?75vmin;\\s*?}/g), 'Your <code>p</code> tag should have a <code>width</code> of 75vmin.')"
|
||||
"text": "Your <code>p</code> tag should have a <code>width</code> of 75vmin.",
|
||||
"testString": "assert(code.match(/p\\s*?{\\s*?width:\\s*?75vmin;\\s*?}/g), 'Your <code>p</code> tag should have a <code>width</code> of 75vmin.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
|
@ -18,28 +18,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>convertToF(0)</code> should return a number'",
|
||||
"testString": "assert(typeof convertToF(0) === 'number', '<code>convertToF(0)</code> should return a number')"
|
||||
"text": "<code>convertToF(0)</code> should return a number",
|
||||
"testString": "assert(typeof convertToF(0) === 'number', '<code>convertToF(0)</code> should return a number');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToF(-30)</code> should return a value of <code>-22</code>'",
|
||||
"testString": "assert(convertToF(-30) === -22, '<code>convertToF(-30)</code> should return a value of <code>-22</code>')"
|
||||
"text": "<code>convertToF(-30)</code> should return a value of <code>-22</code>",
|
||||
"testString": "assert(convertToF(-30) === -22, '<code>convertToF(-30)</code> should return a value of <code>-22</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToF(-10)</code> should return a value of <code>14</code>'",
|
||||
"testString": "assert(convertToF(-10) === 14, '<code>convertToF(-10)</code> should return a value of <code>14</code>')"
|
||||
"text": "<code>convertToF(-10)</code> should return a value of <code>14</code>",
|
||||
"testString": "assert(convertToF(-10) === 14, '<code>convertToF(-10)</code> should return a value of <code>14</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToF(0)</code> should return a value of <code>32</code>'",
|
||||
"testString": "assert(convertToF(0) === 32, '<code>convertToF(0)</code> should return a value of <code>32</code>')"
|
||||
"text": "<code>convertToF(0)</code> should return a value of <code>32</code>",
|
||||
"testString": "assert(convertToF(0) === 32, '<code>convertToF(0)</code> should return a value of <code>32</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToF(20)</code> should return a value of <code>68</code>'",
|
||||
"testString": "assert(convertToF(20) === 68, '<code>convertToF(20)</code> should return a value of <code>68</code>')"
|
||||
"text": "<code>convertToF(20)</code> should return a value of <code>68</code>",
|
||||
"testString": "assert(convertToF(20) === 68, '<code>convertToF(20)</code> should return a value of <code>68</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToF(30)</code> should return a value of <code>86</code>'",
|
||||
"testString": "assert(convertToF(30) === 86, '<code>convertToF(30)</code> should return a value of <code>86</code>')"
|
||||
"text": "<code>convertToF(30)</code> should return a value of <code>86</code>",
|
||||
"testString": "assert(convertToF(30) === 86, '<code>convertToF(30)</code> should return a value of <code>86</code>');"
|
||||
}
|
||||
],
|
||||
"type": "checkpoint",
|
||||
@ -91,20 +91,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>reverseString(\"hello\")</code> should return a string.'",
|
||||
"testString": "assert(typeof reverseString(\"hello\") === \"string\", '<code>reverseString(\"hello\")</code> should return a string.')"
|
||||
"text": "<code>reverseString(\"hello\")</code> should return a string.",
|
||||
"testString": "assert(typeof reverseString(\"hello\") === \"string\", '<code>reverseString(\"hello\")</code> should return a string.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>reverseString(\"hello\")</code> should become <code>\"olleh\"</code>.'",
|
||||
"testString": "assert(reverseString(\"hello\") === \"olleh\", '<code>reverseString(\"hello\")</code> should become <code>\"olleh\"</code>.')"
|
||||
"text": "<code>reverseString(\"hello\")</code> should become <code>\"olleh\"</code>.",
|
||||
"testString": "assert(reverseString(\"hello\") === \"olleh\", '<code>reverseString(\"hello\")</code> should become <code>\"olleh\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>reverseString(\"Howdy\")</code> should become <code>\"ydwoH\"</code>.'",
|
||||
"testString": "assert(reverseString(\"Howdy\") === \"ydwoH\", '<code>reverseString(\"Howdy\")</code> should become <code>\"ydwoH\"</code>.')"
|
||||
"text": "<code>reverseString(\"Howdy\")</code> should become <code>\"ydwoH\"</code>.",
|
||||
"testString": "assert(reverseString(\"Howdy\") === \"ydwoH\", '<code>reverseString(\"Howdy\")</code> should become <code>\"ydwoH\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.'",
|
||||
"testString": "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", '<code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.')"
|
||||
"text": "<code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.",
|
||||
"testString": "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", '<code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -169,24 +169,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>factorialize(5)</code> should return a number.'",
|
||||
"testString": "assert(typeof factorialize(5) === 'number', '<code>factorialize(5)</code> should return a number.')"
|
||||
"text": "<code>factorialize(5)</code> should return a number.",
|
||||
"testString": "assert(typeof factorialize(5) === 'number', '<code>factorialize(5)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>factorialize(5)</code> should return 120.'",
|
||||
"testString": "assert(factorialize(5) === 120, '<code>factorialize(5)</code> should return 120.')"
|
||||
"text": "<code>factorialize(5)</code> should return 120.",
|
||||
"testString": "assert(factorialize(5) === 120, '<code>factorialize(5)</code> should return 120.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>factorialize(10)</code> should return 3628800.'",
|
||||
"testString": "assert(factorialize(10) === 3628800, '<code>factorialize(10)</code> should return 3628800.')"
|
||||
"text": "<code>factorialize(10)</code> should return 3628800.",
|
||||
"testString": "assert(factorialize(10) === 3628800, '<code>factorialize(10)</code> should return 3628800.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>factorialize(20)</code> should return 2432902008176640000.'",
|
||||
"testString": "assert(factorialize(20) === 2432902008176640000, '<code>factorialize(20)</code> should return 2432902008176640000.')"
|
||||
"text": "<code>factorialize(20)</code> should return 2432902008176640000.",
|
||||
"testString": "assert(factorialize(20) === 2432902008176640000, '<code>factorialize(20)</code> should return 2432902008176640000.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>factorialize(0)</code> should return 1.'",
|
||||
"testString": "assert(factorialize(0) === 1, '<code>factorialize(0)</code> should return 1.')"
|
||||
"text": "<code>factorialize(0)</code> should return 1.",
|
||||
"testString": "assert(factorialize(0) === 1, '<code>factorialize(0)</code> should return 1.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -247,28 +247,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return a number.'",
|
||||
"testString": "assert(typeof findLongestWordLength(\"The quick brown fox jumped over the lazy dog\") === \"number\", '<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return a number.')"
|
||||
"text": "<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return a number.",
|
||||
"testString": "assert(typeof findLongestWordLength(\"The quick brown fox jumped over the lazy dog\") === \"number\", '<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return 6.'",
|
||||
"testString": "assert(findLongestWordLength(\"The quick brown fox jumped over the lazy dog\") === 6, '<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return 6.')"
|
||||
"text": "<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return 6.",
|
||||
"testString": "assert(findLongestWordLength(\"The quick brown fox jumped over the lazy dog\") === 6, '<code>findLongestWordLength(\"The quick brown fox jumped over the lazy dog\")</code> should return 6.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"May the force be with you\")</code> should return 5.'",
|
||||
"testString": "assert(findLongestWordLength(\"May the force be with you\") === 5, '<code>findLongestWordLength(\"May the force be with you\")</code> should return 5.')"
|
||||
"text": "<code>findLongestWordLength(\"May the force be with you\")</code> should return 5.",
|
||||
"testString": "assert(findLongestWordLength(\"May the force be with you\") === 5, '<code>findLongestWordLength(\"May the force be with you\")</code> should return 5.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"Google do a barrel roll\")</code> should return 6.'",
|
||||
"testString": "assert(findLongestWordLength(\"Google do a barrel roll\") === 6, '<code>findLongestWordLength(\"Google do a barrel roll\")</code> should return 6.')"
|
||||
"text": "<code>findLongestWordLength(\"Google do a barrel roll\")</code> should return 6.",
|
||||
"testString": "assert(findLongestWordLength(\"Google do a barrel roll\") === 6, '<code>findLongestWordLength(\"Google do a barrel roll\")</code> should return 6.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\")</code> should return 8.'",
|
||||
"testString": "assert(findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\") === 8, '<code>findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\")</code> should return 8.')"
|
||||
"text": "<code>findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\")</code> should return 8.",
|
||||
"testString": "assert(findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\") === 8, '<code>findLongestWordLength(\"What is the average airspeed velocity of an unladen swallow\")</code> should return 8.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\")</code> should return 19.'",
|
||||
"testString": "assert(findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\") === 19, '<code>findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\")</code> should return 19.')"
|
||||
"text": "<code>findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\")</code> should return 19.",
|
||||
"testString": "assert(findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\") === 19, '<code>findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\")</code> should return 19.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -326,20 +326,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return an array.'",
|
||||
"testString": "assert(largestOfFour([[4, '<code>largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return an array.')"
|
||||
"text": "<code>largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return an array.",
|
||||
"testString": "assert(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]).constructor === Array, '<code>largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return an array.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return <code>[27, 5, 39, 1001]</code>.'",
|
||||
"testString": "assert.deepEqual(largestOfFour([[13, '<code>largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return <code>[27, 5, 39, 1001]</code>.')"
|
||||
"text": "<code>largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return <code>[27, 5, 39, 1001]</code>.",
|
||||
"testString": "assert.deepEqual(largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]), [27, 5, 39, 1001], '<code>largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return <code>[27, 5, 39, 1001]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]])</code> should return <code>[9, 35, 97, 1000000]</code>.'",
|
||||
"testString": "assert.deepEqual(largestOfFour([[4, '<code>largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]])</code> should return <code>[9, 35, 97, 1000000]</code>.')"
|
||||
"text": "<code>largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]])</code> should return <code>[9, 35, 97, 1000000]</code>.",
|
||||
"testString": "assert.deepEqual(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]), [9, 35, 97, 1000000], '<code>largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]])</code> should return <code>[9, 35, 97, 1000000]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]])</code> should return <code>[25, 48, 21, -3]</code>.'",
|
||||
"testString": "assert.deepEqual(largestOfFour([[17, '<code>largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]])</code> should return <code>[25, 48, 21, -3]</code>.')"
|
||||
"text": "<code>largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]])</code> should return <code>[25, 48, 21, -3]</code>.",
|
||||
"testString": "assert.deepEqual(largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]]), [25, 48, 21, -3], '<code>largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]])</code> should return <code>[25, 48, 21, -3]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -398,48 +398,48 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Bastian\", \"n\")</code> should return true.'",
|
||||
"testString": "assert(confirmEnding(\"Bastian\", '<code>confirmEnding(\"Bastian\", \"n\")</code> should return true.')"
|
||||
"text": "<code>confirmEnding(\"Bastian\", \"n\")</code> should return true.",
|
||||
"testString": "assert(confirmEnding(\"Bastian\", \"n\") === true, '<code>confirmEnding(\"Bastian\", \"n\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Congratulation\", \"on\")</code> should return true.'",
|
||||
"testString": "assert(confirmEnding(\"Congratulation\", '<code>confirmEnding(\"Congratulation\", \"on\")</code> should return true.')"
|
||||
"text": "<code>confirmEnding(\"Congratulation\", \"on\")</code> should return true.",
|
||||
"testString": "assert(confirmEnding(\"Congratulation\", \"on\") === true, '<code>confirmEnding(\"Congratulation\", \"on\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Connor\", \"n\")</code> should return false.'",
|
||||
"testString": "assert(confirmEnding(\"Connor\", '<code>confirmEnding(\"Connor\", \"n\")</code> should return false.')"
|
||||
"text": "<code>confirmEnding(\"Connor\", \"n\")</code> should return false.",
|
||||
"testString": "assert(confirmEnding(\"Connor\", \"n\") === false, '<code>confirmEnding(\"Connor\", \"n\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\")</code> should return false.'",
|
||||
"testString": "assert(confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", '<code>confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\")</code> should return false.')"
|
||||
"text": "<code>confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\")</code> should return false.",
|
||||
"testString": "assert(confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\") === false, '<code>confirmEnding(\"Walking on water and developing software from a specification are easy if both are frozen\", \"specification\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"He has to give me a new name\", \"name\")</code> should return true.'",
|
||||
"testString": "assert(confirmEnding(\"He has to give me a new name\", '<code>confirmEnding(\"He has to give me a new name\", \"name\")</code> should return true.')"
|
||||
"text": "<code>confirmEnding(\"He has to give me a new name\", \"name\")</code> should return true.",
|
||||
"testString": "assert(confirmEnding(\"He has to give me a new name\", \"name\") === true, '<code>confirmEnding(\"He has to give me a new name\", \"name\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"same\")</code> should return true.'",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", '<code>confirmEnding(\"Open sesame\", \"same\")</code> should return true.')"
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"same\")</code> should return true.",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", \"same\") === true, '<code>confirmEnding(\"Open sesame\", \"same\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"pen\")</code> should return false.'",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", '<code>confirmEnding(\"Open sesame\", \"pen\")</code> should return false.')"
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"pen\")</code> should return false.",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", \"pen\") === false, '<code>confirmEnding(\"Open sesame\", \"pen\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"game\")</code> should return false.'",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", '<code>confirmEnding(\"Open sesame\", \"game\")</code> should return false.')"
|
||||
"text": "<code>confirmEnding(\"Open sesame\", \"game\")</code> should return false.",
|
||||
"testString": "assert(confirmEnding(\"Open sesame\", \"game\") === false, '<code>confirmEnding(\"Open sesame\", \"game\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\")</code> should return false.'",
|
||||
"testString": "assert(confirmEnding(\"If you want to save our world, '<code>confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\")</code> should return false.')"
|
||||
"text": "<code>confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\")</code> should return false.",
|
||||
"testString": "assert(confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, '<code>confirmEnding(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>confirmEnding(\"Abstraction\", \"action\")</code> should return true.'",
|
||||
"testString": "assert(confirmEnding(\"Abstraction\", '<code>confirmEnding(\"Abstraction\", \"action\")</code> should return true.')"
|
||||
"text": "<code>confirmEnding(\"Abstraction\", \"action\")</code> should return true.",
|
||||
"testString": "assert(confirmEnding(\"Abstraction\", \"action\") === true, '<code>confirmEnding(\"Abstraction\", \"action\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "Do not use the built-in method <code>.endsWith()</code> to solve the challenge.'",
|
||||
"testString": "assert(!(/\\.endsWith\\(.*?\\)\\s*?;?/.test(code)) && !(/\\['endsWith'\\]/.test(code)), 'Do not use the built-in method <code>.endsWith()</code> to solve the challenge.')"
|
||||
"text": "Do not use the built-in method <code>.endsWith()</code> to solve the challenge.",
|
||||
"testString": "assert(!(/\\.endsWith\\(.*?\\)\\s*?;?/.test(code)) && !(/\\['endsWith'\\]/.test(code)), 'Do not use the built-in method <code>.endsWith()</code> to solve the challenge.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -497,32 +497,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"*\", 3)</code> should return <code>\"***\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"*\", '<code>repeatStringNumTimes(\"*\", 3)</code> should return <code>\"***\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"*\", 3)</code> should return <code>\"***\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"*\", 3) === \"***\", '<code>repeatStringNumTimes(\"*\", 3)</code> should return <code>\"***\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 3)</code> should return <code>\"abcabcabc\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", '<code>repeatStringNumTimes(\"abc\", 3)</code> should return <code>\"abcabcabc\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 3)</code> should return <code>\"abcabcabc\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", 3) === \"abcabcabc\", '<code>repeatStringNumTimes(\"abc\", 3)</code> should return <code>\"abcabcabc\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 4)</code> should return <code>\"abcabcabcabc\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", '<code>repeatStringNumTimes(\"abc\", 4)</code> should return <code>\"abcabcabcabc\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 4)</code> should return <code>\"abcabcabcabc\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", 4) === \"abcabcabcabc\", '<code>repeatStringNumTimes(\"abc\", 4)</code> should return <code>\"abcabcabcabc\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 1)</code> should return <code>\"abc\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", '<code>repeatStringNumTimes(\"abc\", 1)</code> should return <code>\"abc\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", 1)</code> should return <code>\"abc\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", 1) === \"abc\", '<code>repeatStringNumTimes(\"abc\", 1)</code> should return <code>\"abc\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"*\", 8)</code> should return <code>\"********\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"*\", '<code>repeatStringNumTimes(\"*\", 8)</code> should return <code>\"********\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"*\", 8)</code> should return <code>\"********\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"*\", 8) === \"********\", '<code>repeatStringNumTimes(\"*\", 8)</code> should return <code>\"********\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", -2)</code> should return <code>\"\"</code>.'",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", '<code>repeatStringNumTimes(\"abc\", -2)</code> should return <code>\"\"</code>.')"
|
||||
"text": "<code>repeatStringNumTimes(\"abc\", -2)</code> should return <code>\"\"</code>.",
|
||||
"testString": "assert(repeatStringNumTimes(\"abc\", -2) === \"\", '<code>repeatStringNumTimes(\"abc\", -2)</code> should return <code>\"\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The built-in <code>repeat()</code>-method should not be used'",
|
||||
"testString": "assert(!/\\.repeat/g.test(code), 'The built-in <code>repeat()</code>-method should not be used')"
|
||||
"text": "The built-in <code>repeat()</code>-method should not be used",
|
||||
"testString": "assert(!/\\.repeat/g.test(code), 'The built-in <code>repeat()</code>-method should not be used');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -577,28 +577,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", 8)</code> should return \"A-tisket...\".'",
|
||||
"testString": "assert(truncateString(\"A-tisket a-tasket A green and yellow basket\", '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", 8)</code> should return \"A-tisket...\".')"
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", 8)</code> should return \"A-tisket...\".",
|
||||
"testString": "assert(truncateString(\"A-tisket a-tasket A green and yellow basket\", 8) === \"A-tisket...\", '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", 8)</code> should return \"A-tisket...\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truncateString(\"Peter Piper picked a peck of pickled peppers\", 11)</code> should return \"Peter Piper...\".'",
|
||||
"testString": "assert(truncateString(\"Peter Piper picked a peck of pickled peppers\", '<code>truncateString(\"Peter Piper picked a peck of pickled peppers\", 11)</code> should return \"Peter Piper...\".')"
|
||||
"text": "<code>truncateString(\"Peter Piper picked a peck of pickled peppers\", 11)</code> should return \"Peter Piper...\".",
|
||||
"testString": "assert(truncateString(\"Peter Piper picked a peck of pickled peppers\", 11) === \"Peter Piper...\", '<code>truncateString(\"Peter Piper picked a peck of pickled peppers\", 11)</code> should return \"Peter Piper...\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length)</code> should return \"A-tisket a-tasket A green and yellow basket\".'",
|
||||
"testString": "assert(truncateString(\"A-tisket a-tasket A green and yellow basket\", '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length)</code> should return \"A-tisket a-tasket A green and yellow basket\".')"
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length)</code> should return \"A-tisket a-tasket A green and yellow basket\".",
|
||||
"testString": "assert(truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length) === \"A-tisket a-tasket A green and yellow basket\", '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length)</code> should return \"A-tisket a-tasket A green and yellow basket\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2)</code> should return \"A-tisket a-tasket A green and yellow basket\".'",
|
||||
"testString": "assert(truncateString('A-tisket a-tasket A green and yellow basket', '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2)</code> should return \"A-tisket a-tasket A green and yellow basket\".')"
|
||||
"text": "<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2)</code> should return \"A-tisket a-tasket A green and yellow basket\".",
|
||||
"testString": "assert(truncateString('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length + 2) === 'A-tisket a-tasket A green and yellow basket', '<code>truncateString(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2)</code> should return \"A-tisket a-tasket A green and yellow basket\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truncateString(\"A-\", 1)</code> should return \"A...\".'",
|
||||
"testString": "assert(truncateString(\"A-\", '<code>truncateString(\"A-\", 1)</code> should return \"A...\".')"
|
||||
"text": "<code>truncateString(\"A-\", 1)</code> should return \"A...\".",
|
||||
"testString": "assert(truncateString(\"A-\", 1) === \"A...\", '<code>truncateString(\"A-\", 1)</code> should return \"A...\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truncateString(\"Absolutely Longer\", 2)</code> should return \"Ab...\".'",
|
||||
"testString": "assert(truncateString(\"Absolutely Longer\", '<code>truncateString(\"Absolutely Longer\", 2)</code> should return \"Ab...\".')"
|
||||
"text": "<code>truncateString(\"Absolutely Longer\", 2)</code> should return \"Ab...\".",
|
||||
"testString": "assert(truncateString(\"Absolutely Longer\", 2) === \"Ab...\", '<code>truncateString(\"Absolutely Longer\", 2)</code> should return \"Ab...\".');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -656,12 +656,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>findElement([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; })</code> should return 8.'",
|
||||
"testString": "assert.strictEqual(findElement([1, '<code>findElement([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; })</code> should return 8.')"
|
||||
"text": "<code>findElement([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; })</code> should return 8.",
|
||||
"testString": "assert.strictEqual(findElement([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, '<code>findElement([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; })</code> should return 8.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; })</code> should return undefined.'",
|
||||
"testString": "assert.strictEqual(findElement([1, '<code>findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; })</code> should return undefined.')"
|
||||
"text": "<code>findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; })</code> should return undefined.",
|
||||
"testString": "assert.strictEqual(findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, '<code>findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; })</code> should return undefined.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -724,44 +724,44 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>booWho(true)</code> should return true.'",
|
||||
"testString": "assert.strictEqual(booWho(true), '<code>booWho(true)</code> should return true.')"
|
||||
"text": "<code>booWho(true)</code> should return true.",
|
||||
"testString": "assert.strictEqual(booWho(true), true, '<code>booWho(true)</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(false)</code> should return true.'",
|
||||
"testString": "assert.strictEqual(booWho(false), '<code>booWho(false)</code> should return true.')"
|
||||
"text": "<code>booWho(false)</code> should return true.",
|
||||
"testString": "assert.strictEqual(booWho(false), true, '<code>booWho(false)</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho([1, 2, 3])</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho([1, '<code>booWho([1, 2, 3])</code> should return false.')"
|
||||
"text": "<code>booWho([1, 2, 3])</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho([1, 2, 3]), false, '<code>booWho([1, 2, 3])</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho([].slice)</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho([].slice), '<code>booWho([].slice)</code> should return false.')"
|
||||
"text": "<code>booWho([].slice)</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho([].slice), false, '<code>booWho([].slice)</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho({ \"a\": 1 })</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho({ \"a\": 1 }), '<code>booWho({ \"a\": 1 })</code> should return false.')"
|
||||
"text": "<code>booWho({ \"a\": 1 })</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho({ \"a\": 1 }), false, '<code>booWho({ \"a\": 1 })</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(1)</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho(1), '<code>booWho(1)</code> should return false.')"
|
||||
"text": "<code>booWho(1)</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho(1), false, '<code>booWho(1)</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(NaN)</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho(NaN), '<code>booWho(NaN)</code> should return false.')"
|
||||
"text": "<code>booWho(NaN)</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho(NaN), false, '<code>booWho(NaN)</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(\"a\")</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho(\"a\"), '<code>booWho(\"a\")</code> should return false.')"
|
||||
"text": "<code>booWho(\"a\")</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho(\"a\"), false, '<code>booWho(\"a\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(\"true\")</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho(\"true\"), '<code>booWho(\"true\")</code> should return false.')"
|
||||
"text": "<code>booWho(\"true\")</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho(\"true\"), false, '<code>booWho(\"true\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>booWho(\"false\")</code> should return false.'",
|
||||
"testString": "assert.strictEqual(booWho(\"false\"), '<code>booWho(\"false\")</code> should return false.')"
|
||||
"text": "<code>booWho(\"false\")</code> should return false.",
|
||||
"testString": "assert.strictEqual(booWho(\"false\"), false, '<code>booWho(\"false\")</code> should return false.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -824,20 +824,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>titleCase(\"I'm a little tea pot\")</code> should return a string.'",
|
||||
"testString": "assert(typeof titleCase(\"I'm a little tea pot\") === \"string\", '<code>titleCase(\"I'm a little tea pot\")</code> should return a string.')"
|
||||
"text": "<code>titleCase(\"I'm a little tea pot\")</code> should return a string.",
|
||||
"testString": "assert(typeof titleCase(\"I'm a little tea pot\") === \"string\", '<code>titleCase(\"I'm a little tea pot\")</code> should return a string.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>titleCase(\"I'm a little tea pot\")</code> should return <code>I'm A Little Tea Pot</code>.'",
|
||||
"testString": "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", '<code>titleCase(\"I'm a little tea pot\")</code> should return <code>I'm A Little Tea Pot</code>.')"
|
||||
"text": "<code>titleCase(\"I'm a little tea pot\")</code> should return <code>I'm A Little Tea Pot</code>.",
|
||||
"testString": "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", '<code>titleCase(\"I'm a little tea pot\")</code> should return <code>I'm A Little Tea Pot</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>titleCase(\"sHoRt AnD sToUt\")</code> should return <code>Short And Stout</code>.'",
|
||||
"testString": "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", '<code>titleCase(\"sHoRt AnD sToUt\")</code> should return <code>Short And Stout</code>.')"
|
||||
"text": "<code>titleCase(\"sHoRt AnD sToUt\")</code> should return <code>Short And Stout</code>.",
|
||||
"testString": "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", '<code>titleCase(\"sHoRt AnD sToUt\")</code> should return <code>Short And Stout</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return <code>Here Is My Handle Here Is My Spout</code>.'",
|
||||
"testString": "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", '<code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return <code>Here Is My Handle Here Is My Spout</code>.')"
|
||||
"text": "<code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return <code>Here Is My Handle Here Is My Spout</code>.",
|
||||
"testString": "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", '<code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return <code>Here Is My Handle Here Is My Spout</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -896,28 +896,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>frankenSplice([1, 2, 3], [4, 5], 1)</code> should return <code>[4, 1, 2, 3, 5]</code>.'",
|
||||
"testString": "assert.deepEqual(frankenSplice([1, '<code>frankenSplice([1, 2, 3], [4, 5], 1)</code> should return <code>[4, 1, 2, 3, 5]</code>.')"
|
||||
"text": "<code>frankenSplice([1, 2, 3], [4, 5], 1)</code> should return <code>[4, 1, 2, 3, 5]</code>.",
|
||||
"testString": "assert.deepEqual(frankenSplice([1, 2, 3], [4, 5], 1), [4, 1, 2, 3, 5], '<code>frankenSplice([1, 2, 3], [4, 5], 1)</code> should return <code>[4, 1, 2, 3, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>frankenSplice([1, 2], [\"a\", \"b\"], 1)</code> should return <code>[\"a\", 1, 2, \"b\"]</code>.'",
|
||||
"testString": "assert.deepEqual(frankenSplice(testArr1, '<code>frankenSplice([1, 2], [\"a\", \"b\"], 1)</code> should return <code>[\"a\", 1, 2, \"b\"]</code>.')"
|
||||
"text": "<code>frankenSplice([1, 2], [\"a\", \"b\"], 1)</code> should return <code>[\"a\", 1, 2, \"b\"]</code>.",
|
||||
"testString": "assert.deepEqual(frankenSplice(testArr1, testArr2, 1), [\"a\", 1, 2, \"b\"], '<code>frankenSplice([1, 2], [\"a\", \"b\"], 1)</code> should return <code>[\"a\", 1, 2, \"b\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>frankenSplice([\"claw\", \"tentacle\"], [\"head\", \"shoulders\", \"knees\", \"toes\"], 2)</code> should return <code>[\"head\", \"shoulders\", \"claw\", \"tentacle\", \"knees\", \"toes\"]</code>.'",
|
||||
"testString": "assert.deepEqual(frankenSplice([\"claw\", '<code>frankenSplice([\"claw\", \"tentacle\"], [\"head\", \"shoulders\", \"knees\", \"toes\"], 2)</code> should return <code>[\"head\", \"shoulders\", \"claw\", \"tentacle\", \"knees\", \"toes\"]</code>.')"
|
||||
"text": "<code>frankenSplice([\"claw\", \"tentacle\"], [\"head\", \"shoulders\", \"knees\", \"toes\"], 2)</code> should return <code>[\"head\", \"shoulders\", \"claw\", \"tentacle\", \"knees\", \"toes\"]</code>.",
|
||||
"testString": "assert.deepEqual(frankenSplice([\"claw\", \"tentacle\"], [\"head\", \"shoulders\", \"knees\", \"toes\"], 2), [\"head\", \"shoulders\", \"claw\", \"tentacle\", \"knees\", \"toes\"], '<code>frankenSplice([\"claw\", \"tentacle\"], [\"head\", \"shoulders\", \"knees\", \"toes\"], 2)</code> should return <code>[\"head\", \"shoulders\", \"claw\", \"tentacle\", \"knees\", \"toes\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "All elements from the first array should be added to the second array in their original order.'",
|
||||
"testString": "assert.deepEqual(frankenSplice([1, 'All elements from the first array should be added to the second array in their original order.')"
|
||||
"text": "All elements from the first array should be added to the second array in their original order.",
|
||||
"testString": "assert.deepEqual(frankenSplice([1, 2, 3, 4], [], 0), [1, 2, 3, 4], 'All elements from the first array should be added to the second array in their original order.');"
|
||||
},
|
||||
{
|
||||
"text": "The first array should remain the same after the function runs.'",
|
||||
"testString": "assert(testArr1[0] === 1 && testArr1[1] === 2, 'The first array should remain the same after the function runs.')"
|
||||
"text": "The first array should remain the same after the function runs.",
|
||||
"testString": "assert(testArr1[0] === 1 && testArr1[1] === 2, 'The first array should remain the same after the function runs.');"
|
||||
},
|
||||
{
|
||||
"text": "The second array should remain the same after the function runs.'",
|
||||
"testString": "assert(testArr2[0] === \"a\" && testArr2[1] === \"b\", 'The second array should remain the same after the function runs.')"
|
||||
"text": "The second array should remain the same after the function runs.",
|
||||
"testString": "assert(testArr2[0] === \"a\" && testArr2[1] === \"b\", 'The second array should remain the same after the function runs.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -971,20 +971,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>bouncer([7, \"ate\", \"\", false, 9])</code> should return <code>[7, \"ate\", 9]</code>.'",
|
||||
"testString": "assert.deepEqual(bouncer([7, '<code>bouncer([7, \"ate\", \"\", false, 9])</code> should return <code>[7, \"ate\", 9]</code>.')"
|
||||
"text": "<code>bouncer([7, \"ate\", \"\", false, 9])</code> should return <code>[7, \"ate\", 9]</code>.",
|
||||
"testString": "assert.deepEqual(bouncer([7, \"ate\", \"\", false, 9]), [7, \"ate\", 9], '<code>bouncer([7, \"ate\", \"\", false, 9])</code> should return <code>[7, \"ate\", 9]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bouncer([\"a\", \"b\", \"c\"])</code> should return <code>[\"a\", \"b\", \"c\"]</code>.'",
|
||||
"testString": "assert.deepEqual(bouncer([\"a\", '<code>bouncer([\"a\", \"b\", \"c\"])</code> should return <code>[\"a\", \"b\", \"c\"]</code>.')"
|
||||
"text": "<code>bouncer([\"a\", \"b\", \"c\"])</code> should return <code>[\"a\", \"b\", \"c\"]</code>.",
|
||||
"testString": "assert.deepEqual(bouncer([\"a\", \"b\", \"c\"]), [\"a\", \"b\", \"c\"], '<code>bouncer([\"a\", \"b\", \"c\"])</code> should return <code>[\"a\", \"b\", \"c\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bouncer([false, null, 0, NaN, undefined, \"\"])</code> should return <code>[]</code>.'",
|
||||
"testString": "assert.deepEqual(bouncer([false, '<code>bouncer([false, null, 0, NaN, undefined, \"\"])</code> should return <code>[]</code>.')"
|
||||
"text": "<code>bouncer([false, null, 0, NaN, undefined, \"\"])</code> should return <code>[]</code>.",
|
||||
"testString": "assert.deepEqual(bouncer([false, null, 0, NaN, undefined, \"\"]), [], '<code>bouncer([false, null, 0, NaN, undefined, \"\"])</code> should return <code>[]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.'",
|
||||
"testString": "assert.deepEqual(bouncer([1, '<code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.')"
|
||||
"text": "<code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.",
|
||||
"testString": "assert.deepEqual(bouncer([1, null, NaN, 2, undefined]), [1, 2], '<code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1045,68 +1045,68 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.'",
|
||||
"testString": "assert(getIndexToIns([10, '<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.')"
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.",
|
||||
"testString": "assert(getIndexToIns([10, 20, 30, 40, 50], 35) === 3, '<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return <code>3</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([10, '<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([10, 20, 30, 40, 50], 35)) === \"number\", '<code>getIndexToIns([10, 20, 30, 40, 50], 35)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.'",
|
||||
"testString": "assert(getIndexToIns([10, '<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.')"
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.",
|
||||
"testString": "assert(getIndexToIns([10, 20, 30, 40, 50], 30) === 2, '<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return <code>2</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([10, '<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([10, 20, 30, 40, 50], 30)) === \"number\", '<code>getIndexToIns([10, 20, 30, 40, 50], 30)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([40, 60], 50)</code> should return <code>1</code>.'",
|
||||
"testString": "assert(getIndexToIns([40, '<code>getIndexToIns([40, 60], 50)</code> should return <code>1</code>.')"
|
||||
"text": "<code>getIndexToIns([40, 60], 50)</code> should return <code>1</code>.",
|
||||
"testString": "assert(getIndexToIns([40, 60], 50) === 1, '<code>getIndexToIns([40, 60], 50)</code> should return <code>1</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([40, 60], 50)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([40, '<code>getIndexToIns([40, 60], 50)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([40, 60], 50)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([40, 60], 50)) === \"number\", '<code>getIndexToIns([40, 60], 50)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([3, 10, 5], 3)</code> should return <code>0</code>.'",
|
||||
"testString": "assert(getIndexToIns([3, '<code>getIndexToIns([3, 10, 5], 3)</code> should return <code>0</code>.')"
|
||||
"text": "<code>getIndexToIns([3, 10, 5], 3)</code> should return <code>0</code>.",
|
||||
"testString": "assert(getIndexToIns([3, 10, 5], 3) === 0, '<code>getIndexToIns([3, 10, 5], 3)</code> should return <code>0</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([3, 10, 5], 3)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([3, '<code>getIndexToIns([3, 10, 5], 3)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([3, 10, 5], 3)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([3, 10, 5], 3)) === \"number\", '<code>getIndexToIns([3, 10, 5], 3)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return <code>2</code>.'",
|
||||
"testString": "assert(getIndexToIns([5, '<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return <code>2</code>.')"
|
||||
"text": "<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return <code>2</code>.",
|
||||
"testString": "assert(getIndexToIns([5, 3, 20, 3], 5) === 2, '<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return <code>2</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([5, '<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([5, 3, 20, 3], 5)) === \"number\", '<code>getIndexToIns([5, 3, 20, 3], 5)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([2, 20, 10], 19)</code> should return <code>2</code>.'",
|
||||
"testString": "assert(getIndexToIns([2, '<code>getIndexToIns([2, 20, 10], 19)</code> should return <code>2</code>.')"
|
||||
"text": "<code>getIndexToIns([2, 20, 10], 19)</code> should return <code>2</code>.",
|
||||
"testString": "assert(getIndexToIns([2, 20, 10], 19) === 2, '<code>getIndexToIns([2, 20, 10], 19)</code> should return <code>2</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([2, 20, 10], 19)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([2, '<code>getIndexToIns([2, 20, 10], 19)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([2, 20, 10], 19)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([2, 20, 10], 19)) === \"number\", '<code>getIndexToIns([2, 20, 10], 19)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([2, 5, 10], 15)</code> should return <code>3</code>.'",
|
||||
"testString": "assert(getIndexToIns([2, '<code>getIndexToIns([2, 5, 10], 15)</code> should return <code>3</code>.')"
|
||||
"text": "<code>getIndexToIns([2, 5, 10], 15)</code> should return <code>3</code>.",
|
||||
"testString": "assert(getIndexToIns([2, 5, 10], 15) === 3, '<code>getIndexToIns([2, 5, 10], 15)</code> should return <code>3</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([2, 5, 10], 15)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([2, '<code>getIndexToIns([2, 5, 10], 15)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([2, 5, 10], 15)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([2, 5, 10], 15)) === \"number\", '<code>getIndexToIns([2, 5, 10], 15)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([], 1)</code> should return <code>0</code>.'",
|
||||
"testString": "assert(getIndexToIns([], '<code>getIndexToIns([], 1)</code> should return <code>0</code>.')"
|
||||
"text": "<code>getIndexToIns([], 1)</code> should return <code>0</code>.",
|
||||
"testString": "assert(getIndexToIns([], 1) === 0, '<code>getIndexToIns([], 1)</code> should return <code>0</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getIndexToIns([], 1)</code> should return a number.'",
|
||||
"testString": "assert(typeof(getIndexToIns([], '<code>getIndexToIns([], 1)</code> should return a number.')"
|
||||
"text": "<code>getIndexToIns([], 1)</code> should return a number.",
|
||||
"testString": "assert(typeof(getIndexToIns([], 1)) === \"number\", '<code>getIndexToIns([], 1)</code> should return a number.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1168,40 +1168,40 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>mutation([\"hello\", \"hey\"])</code> should return false.'",
|
||||
"testString": "assert(mutation([\"hello\", '<code>mutation([\"hello\", \"hey\"])</code> should return false.')"
|
||||
"text": "<code>mutation([\"hello\", \"hey\"])</code> should return false.",
|
||||
"testString": "assert(mutation([\"hello\", \"hey\"]) === false, '<code>mutation([\"hello\", \"hey\"])</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"hello\", \"Hello\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"hello\", '<code>mutation([\"hello\", \"Hello\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"hello\", \"Hello\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"hello\", \"Hello\"]) === true, '<code>mutation([\"hello\", \"Hello\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"zyxwvutsrqponmlkjihgfedcba\", '<code>mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"]) === true, '<code>mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"Mary\", \"Army\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"Mary\", '<code>mutation([\"Mary\", \"Army\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"Mary\", \"Army\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"Mary\", \"Army\"]) === true, '<code>mutation([\"Mary\", \"Army\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"Mary\", \"Aarmy\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"Mary\", '<code>mutation([\"Mary\", \"Aarmy\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"Mary\", \"Aarmy\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"Mary\", \"Aarmy\"]) === true, '<code>mutation([\"Mary\", \"Aarmy\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"Alien\", \"line\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"Alien\", '<code>mutation([\"Alien\", \"line\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"Alien\", \"line\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"Alien\", \"line\"]) === true, '<code>mutation([\"Alien\", \"line\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"floor\", \"for\"])</code> should return true.'",
|
||||
"testString": "assert(mutation([\"floor\", '<code>mutation([\"floor\", \"for\"])</code> should return true.')"
|
||||
"text": "<code>mutation([\"floor\", \"for\"])</code> should return true.",
|
||||
"testString": "assert(mutation([\"floor\", \"for\"]) === true, '<code>mutation([\"floor\", \"for\"])</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"hello\", \"neo\"])</code> should return false.'",
|
||||
"testString": "assert(mutation([\"hello\", '<code>mutation([\"hello\", \"neo\"])</code> should return false.')"
|
||||
"text": "<code>mutation([\"hello\", \"neo\"])</code> should return false.",
|
||||
"testString": "assert(mutation([\"hello\", \"neo\"]) === false, '<code>mutation([\"hello\", \"neo\"])</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>mutation([\"voodoo\", \"no\"])</code> should return false.'",
|
||||
"testString": "assert(mutation([\"voodoo\", '<code>mutation([\"voodoo\", \"no\"])</code> should return false.')"
|
||||
"text": "<code>mutation([\"voodoo\", \"no\"])</code> should return false.",
|
||||
"testString": "assert(mutation([\"voodoo\", \"no\"]) === false, '<code>mutation([\"voodoo\", \"no\"])</code> should return false.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1261,32 +1261,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2)</code> should return <code>[[\"a\", \"b\"], [\"c\", \"d\"]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([\"a\", '<code>chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2)</code> should return <code>[[\"a\", \"b\"], [\"c\", \"d\"]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2)</code> should return <code>[[\"a\", \"b\"], [\"c\", \"d\"]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2), [[\"a\", \"b\"], [\"c\", \"d\"]], '<code>chunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2)</code> should return <code>[[\"a\", \"b\"], [\"c\", \"d\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3), [[0, 1, 2], [3, 4, 5]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2), [[0, 1], [2, 3], [4, 5]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5], 4), [[0, 1, 2, 3], [4, 5]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5], [6]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5], [6]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5], [6]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3), [[0, 1, 2], [3, 4, 5], [6]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3)</code> should return <code>[[0, 1, 2], [3, 4, 5], [6]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5, 6, 7], [8]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5, 6, 7], [8]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5, 6, 7], [8]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4), [[0, 1, 2, 3], [4, 5, 6, 7], [8]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 4)</code> should return <code>[[0, 1, 2, 3], [4, 5, 6, 7], [8]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5], [6, 7], [8]]</code>.'",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5], [6, 7], [8]]</code>.')"
|
||||
"text": "<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5], [6, 7], [8]]</code>.",
|
||||
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2), [[0, 1], [2, 3], [4, 5], [6, 7], [8]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5], [6, 7], [8]]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
|
@ -18,24 +18,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "yourArray is an array'",
|
||||
"testString": "assert.strictEqual(Array.isArray(yourArray), 'yourArray is an array')"
|
||||
"text": "yourArray is an array",
|
||||
"testString": "assert.strictEqual(Array.isArray(yourArray), true, 'yourArray is an array');"
|
||||
},
|
||||
{
|
||||
"text": "<code>yourArray</code> is at least 5 elements long'",
|
||||
"testString": "assert.isAtLeast(yourArray.length, '<code>yourArray</code> is at least 5 elements long')"
|
||||
"text": "<code>yourArray</code> is at least 5 elements long",
|
||||
"testString": "assert.isAtLeast(yourArray.length, 5, '<code>yourArray</code> is at least 5 elements long');"
|
||||
},
|
||||
{
|
||||
"text": "<code>yourArray</code> contains at least one <code>boolean</code>'",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'boolean').length >= 1, '<code>yourArray</code> contains at least one <code>boolean</code>')"
|
||||
"text": "<code>yourArray</code> contains at least one <code>boolean</code>",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'boolean').length >= 1, '<code>yourArray</code> contains at least one <code>boolean</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>yourArray</code> contains at least one <code>number</code>'",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'number').length >= 1, '<code>yourArray</code> contains at least one <code>number</code>')"
|
||||
"text": "<code>yourArray</code> contains at least one <code>number</code>",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'number').length >= 1, '<code>yourArray</code> contains at least one <code>number</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>yourArray</code> contains at least one <code>string</code>'",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'string').length >= 1, '<code>yourArray</code> contains at least one <code>string</code>')"
|
||||
"text": "<code>yourArray</code> contains at least one <code>string</code>",
|
||||
"testString": "assert(yourArray.filter( el => typeof el === 'string').length >= 1, '<code>yourArray</code> contains at least one <code>string</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -75,20 +75,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>myArray[0]</code> is equal to <code>\"a\"</code>'",
|
||||
"testString": "assert.strictEqual(myArray[0], '<code>myArray[0]</code> is equal to <code>\"a\"</code>')"
|
||||
"text": "<code>myArray[0]</code> is equal to <code>\"a\"</code>",
|
||||
"testString": "assert.strictEqual(myArray[0], \"a\", '<code>myArray[0]</code> is equal to <code>\"a\"</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myArray[1]</code> is no longer set to <code>\"b\"</code>'",
|
||||
"testString": "assert.notStrictEqual(myArray[1], '<code>myArray[1]</code> is no longer set to <code>\"b\"</code>')"
|
||||
"text": "<code>myArray[1]</code> is no longer set to <code>\"b\"</code>",
|
||||
"testString": "assert.notStrictEqual(myArray[1], \"b\", '<code>myArray[1]</code> is no longer set to <code>\"b\"</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myArray[2]</code> is equal to <code>\"c\"</code>'",
|
||||
"testString": "assert.strictEqual(myArray[2], '<code>myArray[2]</code> is equal to <code>\"c\"</code>')"
|
||||
"text": "<code>myArray[2]</code> is equal to <code>\"c\"</code>",
|
||||
"testString": "assert.strictEqual(myArray[2], \"c\", '<code>myArray[2]</code> is equal to <code>\"c\"</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myArray[3]</code> is equal to <code>\"d\"</code>'",
|
||||
"testString": "assert.strictEqual(myArray[3], '<code>myArray[3]</code> is equal to <code>\"d\"</code>')"
|
||||
"text": "<code>myArray[3]</code> is equal to <code>\"d\"</code>",
|
||||
"testString": "assert.strictEqual(myArray[3], \"d\", '<code>myArray[3]</code> is equal to <code>\"d\"</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -125,16 +125,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>mixedNumbers([\"IV\", 5, \"six\"])</code> should now return <code>[\"I\", 2, \"three\", \"IV\", 5, \"six\", 7, \"VIII\", 9]</code>'",
|
||||
"testString": "assert.deepEqual(mixedNumbers(['IV', '<code>mixedNumbers([\"IV\", 5, \"six\"])</code> should now return <code>[\"I\", 2, \"three\", \"IV\", 5, \"six\", 7, \"VIII\", 9]</code>')"
|
||||
"text": "<code>mixedNumbers([\"IV\", 5, \"six\"])</code> should now return <code>[\"I\", 2, \"three\", \"IV\", 5, \"six\", 7, \"VIII\", 9]</code>",
|
||||
"testString": "assert.deepEqual(mixedNumbers(['IV', 5, 'six']), ['I', 2, 'three', 'IV', 5, 'six', 7, 'VIII', 9], '<code>mixedNumbers([\"IV\", 5, \"six\"])</code> should now return <code>[\"I\", 2, \"three\", \"IV\", 5, \"six\", 7, \"VIII\", 9]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>mixedNumbers</code> function should utilize the <code>push()</code> method'",
|
||||
"testString": "assert.notStrictEqual(mixedNumbers.toString().search(/\\.push\\(/), 'The <code>mixedNumbers</code> function should utilize the <code>push()</code> method')"
|
||||
"text": "The <code>mixedNumbers</code> function should utilize the <code>push()</code> method",
|
||||
"testString": "assert.notStrictEqual(mixedNumbers.toString().search(/\\.push\\(/), -1, 'The <code>mixedNumbers</code> function should utilize the <code>push()</code> method');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>mixedNumbers</code> function should utilize the <code>unshift()</code> method'",
|
||||
"testString": "assert.notStrictEqual(mixedNumbers.toString().search(/\\.unshift\\(/), 'The <code>mixedNumbers</code> function should utilize the <code>unshift()</code> method')"
|
||||
"text": "The <code>mixedNumbers</code> function should utilize the <code>unshift()</code> method",
|
||||
"testString": "assert.notStrictEqual(mixedNumbers.toString().search(/\\.unshift\\(/), -1, 'The <code>mixedNumbers</code> function should utilize the <code>unshift()</code> method');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -177,16 +177,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>popShift([\"challenge\", \"is\", \"not\", \"complete\"])</code> should return <code>[\"challenge\", \"complete\"]</code>'",
|
||||
"testString": "assert.deepEqual(popShift(['challenge', '<code>popShift([\"challenge\", \"is\", \"not\", \"complete\"])</code> should return <code>[\"challenge\", \"complete\"]</code>')"
|
||||
"text": "<code>popShift([\"challenge\", \"is\", \"not\", \"complete\"])</code> should return <code>[\"challenge\", \"complete\"]</code>",
|
||||
"testString": "assert.deepEqual(popShift(['challenge', 'is', 'not', 'complete']), [\"challenge\", \"complete\"], '<code>popShift([\"challenge\", \"is\", \"not\", \"complete\"])</code> should return <code>[\"challenge\", \"complete\"]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>popShift</code> function should utilize the <code>pop()</code> method'",
|
||||
"testString": "assert.notStrictEqual(popShift.toString().search(/\\.pop\\(/), 'The <code>popShift</code> function should utilize the <code>pop()</code> method')"
|
||||
"text": "The <code>popShift</code> function should utilize the <code>pop()</code> method",
|
||||
"testString": "assert.notStrictEqual(popShift.toString().search(/\\.pop\\(/), -1, 'The <code>popShift</code> function should utilize the <code>pop()</code> method');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>popShift</code> function should utilize the <code>shift()</code> method'",
|
||||
"testString": "assert.notStrictEqual(popShift.toString().search(/\\.shift\\(/), 'The <code>popShift</code> function should utilize the <code>shift()</code> method')"
|
||||
"text": "The <code>popShift</code> function should utilize the <code>shift()</code> method",
|
||||
"testString": "assert.notStrictEqual(popShift.toString().search(/\\.shift\\(/), -1, 'The <code>popShift</code> function should utilize the <code>shift()</code> method');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -228,12 +228,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>sumOfTen</code> should return 10'",
|
||||
"testString": "assert.strictEqual(sumOfTen([2, '<code>sumOfTen</code> should return 10')"
|
||||
"text": "<code>sumOfTen</code> should return 10",
|
||||
"testString": "assert.strictEqual(sumOfTen([2, 5, 1, 5, 2, 1]), 10, '<code>sumOfTen</code> should return 10');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>sumOfTen</code> function should utilize the <code>splice()</code> method'",
|
||||
"testString": "assert.notStrictEqual(sumOfTen.toString().search(/\\.splice\\(/), 'The <code>sumOfTen</code> function should utilize the <code>splice()</code> method')"
|
||||
"text": "The <code>sumOfTen</code> function should utilize the <code>splice()</code> method",
|
||||
"testString": "assert.notStrictEqual(sumOfTen.toString().search(/\\.splice\\(/), -1, 'The <code>sumOfTen</code> function should utilize the <code>splice()</code> method');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -274,20 +274,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>'",
|
||||
"testString": "assert.deepEqual(htmlColorNames(['DarkGoldenRod', '<code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>')"
|
||||
"text": "<code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>",
|
||||
"testString": "assert.deepEqual(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']), ['DarkSalmon', 'BlanchedAlmond', 'LavenderBlush', 'PaleTurqoise', 'FireBrick'], '<code>htmlColorNames</code> should return <code>[\"DarkSalmon\", \"BlanchedAlmond\", \"LavenderBlush\", \"PaleTurqoise\", \"FireBrick\"]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method'",
|
||||
"testString": "assert(/.splice/.test(code), 'The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method')"
|
||||
"text": "The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method",
|
||||
"testString": "assert(/.splice/.test(code), 'The <code>htmlColorNames</code> function should utilize the <code>splice()</code> method');"
|
||||
},
|
||||
{
|
||||
"text": "You should not use <code>shift()</code> or <code>unshift()</code>.'",
|
||||
"testString": "assert(!/shift|unshift/.test(code), 'You should not use <code>shift()</code> or <code>unshift()</code>.')"
|
||||
"text": "You should not use <code>shift()</code> or <code>unshift()</code>.",
|
||||
"testString": "assert(!/shift|unshift/.test(code), 'You should not use <code>shift()</code> or <code>unshift()</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "You should not use array bracket notation.'",
|
||||
"testString": "assert(!/\\[\\d\\]\\s*=/.test(code), 'You should not use array bracket notation.')"
|
||||
"text": "You should not use array bracket notation.",
|
||||
"testString": "assert(!/\\[\\d\\]\\s*=/.test(code), 'You should not use array bracket notation.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -328,12 +328,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>forecast</code> should return <code>[\"warm\", \"sunny\"]'",
|
||||
"testString": "assert.deepEqual(forecast(['cold', '<code>forecast</code> should return <code>[\"warm\", \"sunny\"]')"
|
||||
"text": "<code>forecast</code> should return <code>[\"warm\", \"sunny\"]",
|
||||
"testString": "assert.deepEqual(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms']), ['warm', 'sunny'], '<code>forecast</code> should return <code>[\"warm\", \"sunny\"]');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>forecast</code> function should utilize the <code>slice()</code> method'",
|
||||
"testString": "assert(/\\.slice\\(/.test(code), 'The <code>forecast</code> function should utilize the <code>slice()</code> method')"
|
||||
"text": "The <code>forecast</code> function should utilize the <code>slice()</code> method",
|
||||
"testString": "assert(/\\.slice\\(/.test(code), 'The <code>forecast</code> function should utilize the <code>slice()</code> method');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -373,24 +373,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>copyMachine([true, false, true], 2)</code> should return <code>[[true, false, true], [true, false, true]]</code>'",
|
||||
"testString": "assert.deepEqual(copyMachine([true, '<code>copyMachine([true, false, true], 2)</code> should return <code>[[true, false, true], [true, false, true]]</code>')"
|
||||
"text": "<code>copyMachine([true, false, true], 2)</code> should return <code>[[true, false, true], [true, false, true]]</code>",
|
||||
"testString": "assert.deepEqual(copyMachine([true, false, true], 2), [[true, false, true], [true, false, true]], '<code>copyMachine([true, false, true], 2)</code> should return <code>[[true, false, true], [true, false, true]]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>copyMachine([1, 2, 3], 5)</code> should return <code>[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]</code>'",
|
||||
"testString": "assert.deepEqual(copyMachine([1, '<code>copyMachine([1, 2, 3], 5)</code> should return <code>[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]</code>')"
|
||||
"text": "<code>copyMachine([1, 2, 3], 5)</code> should return <code>[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]</code>",
|
||||
"testString": "assert.deepEqual(copyMachine([1, 2, 3], 5), [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]], '<code>copyMachine([1, 2, 3], 5)</code> should return <code>[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>copyMachine([true, true, null], 1)</code> should return <code>[[true, true, null]]</code>'",
|
||||
"testString": "assert.deepEqual(copyMachine([true, '<code>copyMachine([true, true, null], 1)</code> should return <code>[[true, true, null]]</code>')"
|
||||
"text": "<code>copyMachine([true, true, null], 1)</code> should return <code>[[true, true, null]]</code>",
|
||||
"testString": "assert.deepEqual(copyMachine([true, true, null], 1), [[true, true, null]], '<code>copyMachine([true, true, null], 1)</code> should return <code>[[true, true, null]]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>copyMachine([\"it works\"], 3)</code> should return <code>[[\"it works\"], [\"it works\"], [\"it works\"]]</code>'",
|
||||
"testString": "assert.deepEqual(copyMachine(['it works'], '<code>copyMachine([\"it works\"], 3)</code> should return <code>[[\"it works\"], [\"it works\"], [\"it works\"]]</code>')"
|
||||
"text": "<code>copyMachine([\"it works\"], 3)</code> should return <code>[[\"it works\"], [\"it works\"], [\"it works\"]]</code>",
|
||||
"testString": "assert.deepEqual(copyMachine(['it works'], 3), [['it works'], ['it works'], ['it works']], '<code>copyMachine([\"it works\"], 3)</code> should return <code>[[\"it works\"], [\"it works\"], [\"it works\"]]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>copyMachine</code> function should utilize the <code>spread operator</code> with array <code>arr</code>'",
|
||||
"testString": "assert.notStrictEqual(copyMachine.toString().indexOf('.concat(_toConsumableArray(arr))'), 'The <code>copyMachine</code> function should utilize the <code>spread operator</code> with array <code>arr</code>')"
|
||||
"text": "The <code>copyMachine</code> function should utilize the <code>spread operator</code> with array <code>arr</code>",
|
||||
"testString": "assert.notStrictEqual(copyMachine.toString().indexOf('.concat(_toConsumableArray(arr))'), -1, 'The <code>copyMachine</code> function should utilize the <code>spread operator</code> with array <code>arr</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -435,12 +435,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>spreadOut</code> should return <code>[\"learning\", \"to\", \"code\", \"is\", \"fun\"]</code>'",
|
||||
"testString": "assert.deepEqual(spreadOut(), '<code>spreadOut</code> should return <code>[\"learning\", \"to\", \"code\", \"is\", \"fun\"]</code>')"
|
||||
"text": "<code>spreadOut</code> should return <code>[\"learning\", \"to\", \"code\", \"is\", \"fun\"]</code>",
|
||||
"testString": "assert.deepEqual(spreadOut(), ['learning', 'to', 'code', 'is', 'fun'], '<code>spreadOut</code> should return <code>[\"learning\", \"to\", \"code\", \"is\", \"fun\"]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>spreadOut</code> function should utilize spread syntax'",
|
||||
"testString": "assert.notStrictEqual(spreadOut.toString().search(/[...]/), 'The <code>spreadOut</code> function should utilize spread syntax')"
|
||||
"text": "The <code>spreadOut</code> function should utilize spread syntax",
|
||||
"testString": "assert.notStrictEqual(spreadOut.toString().search(/[...]/), -1, 'The <code>spreadOut</code> function should utilize spread syntax');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -480,24 +480,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"mushrooms\")</code> should return <code>false</code>'",
|
||||
"testString": "assert.strictEqual(quickCheck(['squash', '<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"mushrooms\")</code> should return <code>false</code>')"
|
||||
"text": "<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"mushrooms\")</code> should return <code>false</code>",
|
||||
"testString": "assert.strictEqual(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms'), false, '<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"mushrooms\")</code> should return <code>false</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"onions\")</code> should return <code>true</code>'",
|
||||
"testString": "assert.strictEqual(quickCheck(['squash', '<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"onions\")</code> should return <code>true</code>')"
|
||||
"text": "<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"onions\")</code> should return <code>true</code>",
|
||||
"testString": "assert.strictEqual(quickCheck(['squash', 'onions', 'shallots'], 'onions'), true, '<code>quickCheck([\"squash\", \"onions\", \"shallots\"], \"onions\")</code> should return <code>true</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickCheck([3, 5, 9, 125, 45, 2], 125)</code> should return <code>true</code>'",
|
||||
"testString": "assert.strictEqual(quickCheck([3, '<code>quickCheck([3, 5, 9, 125, 45, 2], 125)</code> should return <code>true</code>')"
|
||||
"text": "<code>quickCheck([3, 5, 9, 125, 45, 2], 125)</code> should return <code>true</code>",
|
||||
"testString": "assert.strictEqual(quickCheck([3, 5, 9, 125, 45, 2], 125), true, '<code>quickCheck([3, 5, 9, 125, 45, 2], 125)</code> should return <code>true</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quickCheck([true, false, false], undefined)</code> should return <code>false</code>'",
|
||||
"testString": "assert.strictEqual(quickCheck([true, '<code>quickCheck([true, false, false], undefined)</code> should return <code>false</code>')"
|
||||
"text": "<code>quickCheck([true, false, false], undefined)</code> should return <code>false</code>",
|
||||
"testString": "assert.strictEqual(quickCheck([true, false, false], undefined), false, '<code>quickCheck([true, false, false], undefined)</code> should return <code>false</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>quickCheck</code> function should utilize the <code>indexOf()</code> method'",
|
||||
"testString": "assert.notStrictEqual(quickCheck.toString().search(/\\.indexOf\\(/), 'The <code>quickCheck</code> function should utilize the <code>indexOf()</code> method')"
|
||||
"text": "The <code>quickCheck</code> function should utilize the <code>indexOf()</code> method",
|
||||
"testString": "assert.notStrictEqual(quickCheck.toString().search(/\\.indexOf\\(/), -1, 'The <code>quickCheck</code> function should utilize the <code>indexOf()</code> method');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -538,24 +538,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>filteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)</code> should return <code>[ [10, 8, 3], [14, 6, 23] ]</code>'",
|
||||
"testString": "assert.deepEqual(filteredArray([ [10, '<code>filteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)</code> should return <code>[ [10, 8, 3], [14, 6, 23] ]</code>')"
|
||||
"text": "<code>filteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)</code> should return <code>[ [10, 8, 3], [14, 6, 23] ]</code>",
|
||||
"testString": "assert.deepEqual(filteredArray([ [10, 8, 3], [14, 6, 23], [3, 18, 6] ], 18), [[10, 8, 3], [14, 6, 23]], '<code>filteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)</code> should return <code>[ [10, 8, 3], [14, 6, 23] ]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>filteredArray([ [\"trumpets\", 2], [\"flutes\", 4], [\"saxophones\", 2] ], 2)</code> should return <code>[ [\"flutes\", 4] ]</code>'",
|
||||
"testString": "assert.deepEqual(filteredArray([ ['trumpets', '<code>filteredArray([ [\"trumpets\", 2], [\"flutes\", 4], [\"saxophones\", 2] ], 2)</code> should return <code>[ [\"flutes\", 4] ]</code>')"
|
||||
"text": "<code>filteredArray([ [\"trumpets\", 2], [\"flutes\", 4], [\"saxophones\", 2] ], 2)</code> should return <code>[ [\"flutes\", 4] ]</code>",
|
||||
"testString": "assert.deepEqual(filteredArray([ ['trumpets', 2], ['flutes', 4], ['saxophones', 2] ], 2), [['flutes', 4]], '<code>filteredArray([ [\"trumpets\", 2], [\"flutes\", 4], [\"saxophones\", 2] ], 2)</code> should return <code>[ [\"flutes\", 4] ]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>filteredArray([ [\"amy\", \"beth\", \"sam\"], [\"dave\", \"sean\", \"peter\"] ], \"peter\")</code> should return <code>[ [\"amy\", \"beth\", \"sam\"] ]</code>'",
|
||||
"testString": "assert.deepEqual(filteredArray([['amy', '<code>filteredArray([ [\"amy\", \"beth\", \"sam\"], [\"dave\", \"sean\", \"peter\"] ], \"peter\")</code> should return <code>[ [\"amy\", \"beth\", \"sam\"] ]</code>')"
|
||||
"text": "<code>filteredArray([ [\"amy\", \"beth\", \"sam\"], [\"dave\", \"sean\", \"peter\"] ], \"peter\")</code> should return <code>[ [\"amy\", \"beth\", \"sam\"] ]</code>",
|
||||
"testString": "assert.deepEqual(filteredArray([['amy', 'beth', 'sam'], ['dave', 'sean', 'peter']], 'peter'), [['amy', 'beth', 'sam']], '<code>filteredArray([ [\"amy\", \"beth\", \"sam\"], [\"dave\", \"sean\", \"peter\"] ], \"peter\")</code> should return <code>[ [\"amy\", \"beth\", \"sam\"] ]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)</code> should return <code>[ ]</code>'",
|
||||
"testString": "assert.deepEqual(filteredArray([[3, '<code>filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)</code> should return <code>[ ]</code>')"
|
||||
"text": "<code>filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)</code> should return <code>[ ]</code>",
|
||||
"testString": "assert.deepEqual(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3), [], '<code>filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)</code> should return <code>[ ]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>filteredArray</code> function should utilize a <code>for</code> loop'",
|
||||
"testString": "assert.notStrictEqual(filteredArray.toString().search(/for/), 'The <code>filteredArray</code> function should utilize a <code>for</code> loop')"
|
||||
"text": "The <code>filteredArray</code> function should utilize a <code>for</code> loop",
|
||||
"testString": "assert.notStrictEqual(filteredArray.toString().search(/for/), -1, 'The <code>filteredArray</code> function should utilize a <code>for</code> loop');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -602,24 +602,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>myNestedArray</code> should contain only numbers, booleans, and strings as data elements'",
|
||||
"testString": "assert.strictEqual((function(arr) { let flattened = (function flatten(arr) { const flat = [].concat(...arr); return flat.some (Array.isArray) ? flatten(flat) : flat; })(arr); for (let i = 0; i < flattened.length; i++) { if ( typeof flattened[i] !== 'number' && typeof flattened[i] !== 'string' && typeof flattened[i] !== 'boolean') { return false } } return true })(myNestedArray), '<code>myNestedArray</code> should contain only numbers, booleans, and strings as data elements')"
|
||||
"text": "<code>myNestedArray</code> should contain only numbers, booleans, and strings as data elements",
|
||||
"testString": "assert.strictEqual((function(arr) { let flattened = (function flatten(arr) { const flat = [].concat(...arr); return flat.some (Array.isArray) ? flatten(flat) : flat; })(arr); for (let i = 0; i < flattened.length; i++) { if ( typeof flattened[i] !== 'number' && typeof flattened[i] !== 'string' && typeof flattened[i] !== 'boolean') { return false } } return true })(myNestedArray), true, '<code>myNestedArray</code> should contain only numbers, booleans, and strings as data elements');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myNestedArray</code> should have exactly 5 levels of depth'",
|
||||
"testString": "assert.strictEqual((function(arr) {let depth = 0;function arrayDepth(array, '<code>myNestedArray</code> should have exactly 5 levels of depth')"
|
||||
"text": "<code>myNestedArray</code> should have exactly 5 levels of depth",
|
||||
"testString": "assert.strictEqual((function(arr) {let depth = 0;function arrayDepth(array, i, d) { if (Array.isArray(array[i])) { arrayDepth(array[i], 0, d + 1);} else { depth = (d > depth) ? d : depth;}if (i < array.length) { arrayDepth(array, i + 1, d);} }arrayDepth(arr, 0, 0);return depth;})(myNestedArray), 4, '<code>myNestedArray</code> should have exactly 5 levels of depth');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deep\"</code> on an array nested 3 levels deep'",
|
||||
"testString": "assert((function howDeep(array, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deep\"</code> on an array nested 3 levels deep')"
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deep\"</code> on an array nested 3 levels deep",
|
||||
"testString": "assert((function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deep').length === 1 && (function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deep')[0] === 2, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deep\"</code> on an array nested 3 levels deep');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deeper\"</code> on an array nested 4 levels deep'",
|
||||
"testString": "assert((function howDeep(array, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deeper\"</code> on an array nested 4 levels deep')"
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deeper\"</code> on an array nested 4 levels deep",
|
||||
"testString": "assert((function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deeper').length === 1 && (function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deeper')[0] === 3, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deeper\"</code> on an array nested 4 levels deep');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deepest\"</code> on an array nested 5 levels deep'",
|
||||
"testString": "assert((function howDeep(array, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deepest\"</code> on an array nested 5 levels deep')"
|
||||
"text": "<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deepest\"</code> on an array nested 5 levels deep",
|
||||
"testString": "assert((function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deepest').length === 1 && (function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deepest')[0] === 4, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deepest\"</code> on an array nested 5 levels deep');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -664,24 +664,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>foods</code> is an object'",
|
||||
"testString": "assert(typeof foods === 'object', '<code>foods</code> is an object')"
|
||||
"text": "<code>foods</code> is an object",
|
||||
"testString": "assert(typeof foods === 'object', '<code>foods</code> is an object');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>foods</code> object has a key <code>\"bananas\"</code> with a value of <code>13</code>'",
|
||||
"testString": "assert(foods.bananas === 13, 'The <code>foods</code> object has a key <code>\"bananas\"</code> with a value of <code>13</code>')"
|
||||
"text": "The <code>foods</code> object has a key <code>\"bananas\"</code> with a value of <code>13</code>",
|
||||
"testString": "assert(foods.bananas === 13, 'The <code>foods</code> object has a key <code>\"bananas\"</code> with a value of <code>13</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>foods</code> object has a key <code>\"grapes\"</code> with a value of <code>35</code>'",
|
||||
"testString": "assert(foods.grapes === 35, 'The <code>foods</code> object has a key <code>\"grapes\"</code> with a value of <code>35</code>')"
|
||||
"text": "The <code>foods</code> object has a key <code>\"grapes\"</code> with a value of <code>35</code>",
|
||||
"testString": "assert(foods.grapes === 35, 'The <code>foods</code> object has a key <code>\"grapes\"</code> with a value of <code>35</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>foods</code> object has a key <code>\"strawberries\"</code> with a value of <code>27</code>'",
|
||||
"testString": "assert(foods.strawberries === 27, 'The <code>foods</code> object has a key <code>\"strawberries\"</code> with a value of <code>27</code>')"
|
||||
"text": "The <code>foods</code> object has a key <code>\"strawberries\"</code> with a value of <code>27</code>",
|
||||
"testString": "assert(foods.strawberries === 27, 'The <code>foods</code> object has a key <code>\"strawberries\"</code> with a value of <code>27</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The key-value pairs should be set using dot or bracket notation'",
|
||||
"testString": "assert(code.search(/bananas:/) === -1 && code.search(/grapes:/) === -1 && code.search(/strawberries:/) === -1, 'The key-value pairs should be set using dot or bracket notation')"
|
||||
"text": "The key-value pairs should be set using dot or bracket notation",
|
||||
"testString": "assert(code.search(/bananas:/) === -1 && code.search(/grapes:/) === -1 && code.search(/strawberries:/) === -1, 'The key-value pairs should be set using dot or bracket notation');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -724,20 +724,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>userActivity</code> has <code>id</code>, <code>date</code> and <code>data</code> properties'",
|
||||
"testString": "assert('id' in userActivity && 'date' in userActivity && 'data' in userActivity, '<code>userActivity</code> has <code>id</code>, <code>date</code> and <code>data</code> properties')"
|
||||
"text": "<code>userActivity</code> has <code>id</code>, <code>date</code> and <code>data</code> properties",
|
||||
"testString": "assert('id' in userActivity && 'date' in userActivity && 'data' in userActivity, '<code>userActivity</code> has <code>id</code>, <code>date</code> and <code>data</code> properties');"
|
||||
},
|
||||
{
|
||||
"text": "<code>userActivity</code> has a <code>data</code> key set to an object with keys <code>totalUsers</code> and <code>online</code>'",
|
||||
"testString": "assert('totalUsers' in userActivity.data && 'online' in userActivity.data, '<code>userActivity</code> has a <code>data</code> key set to an object with keys <code>totalUsers</code> and <code>online</code>')"
|
||||
"text": "<code>userActivity</code> has a <code>data</code> key set to an object with keys <code>totalUsers</code> and <code>online</code>",
|
||||
"testString": "assert('totalUsers' in userActivity.data && 'online' in userActivity.data, '<code>userActivity</code> has a <code>data</code> key set to an object with keys <code>totalUsers</code> and <code>online</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>online</code> property nested in the <code>data</code> key of <code>userActivity</code> should be set to <code>45</code>'",
|
||||
"testString": "assert(userActivity.data.online === 45, 'The <code>online</code> property nested in the <code>data</code> key of <code>userActivity</code> should be set to <code>45</code>')"
|
||||
"text": "The <code>online</code> property nested in the <code>data</code> key of <code>userActivity</code> should be set to <code>45</code>",
|
||||
"testString": "assert(userActivity.data.online === 45, 'The <code>online</code> property nested in the <code>data</code> key of <code>userActivity</code> should be set to <code>45</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>online</code> property is set using dot or bracket notation'",
|
||||
"testString": "assert.strictEqual(code.search(/online: 45/), 'The <code>online</code> property is set using dot or bracket notation')"
|
||||
"text": "The <code>online</code> property is set using dot or bracket notation",
|
||||
"testString": "assert.strictEqual(code.search(/online: 45/), -1, 'The <code>online</code> property is set using dot or bracket notation');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -783,24 +783,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>checkInventory</code> is a function'",
|
||||
"testString": "assert.strictEqual(typeof checkInventory, '<code>checkInventory</code> is a function')"
|
||||
"text": "<code>checkInventory</code> is a function",
|
||||
"testString": "assert.strictEqual(typeof checkInventory, 'function', '<code>checkInventory</code> is a function');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>foods</code> object should have only the following key-value pairs: <code>apples: 25</code>, <code>oranges: 32</code>, <code>plums: 28</code>, <code>bananas: 13</code>, <code>grapes: 35</code>, <code>strawberries: 27</code>'",
|
||||
"testString": "assert.deepEqual(foods, 'The <code>foods</code> object should have only the following key-value pairs: <code>apples: 25</code>, <code>oranges: 32</code>, <code>plums: 28</code>, <code>bananas: 13</code>, <code>grapes: 35</code>, <code>strawberries: 27</code>')"
|
||||
"text": "The <code>foods</code> object should have only the following key-value pairs: <code>apples: 25</code>, <code>oranges: 32</code>, <code>plums: 28</code>, <code>bananas: 13</code>, <code>grapes: 35</code>, <code>strawberries: 27</code>",
|
||||
"testString": "assert.deepEqual(foods, {apples: 25, oranges: 32, plums: 28, bananas: 13, grapes: 35, strawberries: 27}, 'The <code>foods</code> object should have only the following key-value pairs: <code>apples: 25</code>, <code>oranges: 32</code>, <code>plums: 28</code>, <code>bananas: 13</code>, <code>grapes: 35</code>, <code>strawberries: 27</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkInventory(\"apples\")</code> should return <code>25</code>'",
|
||||
"testString": "assert.strictEqual(checkInventory('apples'), '<code>checkInventory(\"apples\")</code> should return <code>25</code>')"
|
||||
"text": "<code>checkInventory(\"apples\")</code> should return <code>25</code>",
|
||||
"testString": "assert.strictEqual(checkInventory('apples'), 25, '<code>checkInventory(\"apples\")</code> should return <code>25</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkInventory(\"bananas\")</code> should return <code>13</code>'",
|
||||
"testString": "assert.strictEqual(checkInventory('bananas'), '<code>checkInventory(\"bananas\")</code> should return <code>13</code>')"
|
||||
"text": "<code>checkInventory(\"bananas\")</code> should return <code>13</code>",
|
||||
"testString": "assert.strictEqual(checkInventory('bananas'), 13, '<code>checkInventory(\"bananas\")</code> should return <code>13</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkInventory(\"strawberries\")</code> should return <code>27</code>'",
|
||||
"testString": "assert.strictEqual(checkInventory('strawberries'), '<code>checkInventory(\"strawberries\")</code> should return <code>27</code>')"
|
||||
"text": "<code>checkInventory(\"strawberries\")</code> should return <code>27</code>",
|
||||
"testString": "assert.strictEqual(checkInventory('strawberries'), 27, '<code>checkInventory(\"strawberries\")</code> should return <code>27</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -850,12 +850,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>foods</code> object only has three keys: <code>apples</code>, <code>grapes</code>, and <code>bananas</code>'",
|
||||
"testString": "assert(!foods.hasOwnProperty('oranges') && !foods.hasOwnProperty('plums') && !foods.hasOwnProperty('strawberries') && Object.keys(foods).length === 3, 'The <code>foods</code> object only has three keys: <code>apples</code>, <code>grapes</code>, and <code>bananas</code>')"
|
||||
"text": "The <code>foods</code> object only has three keys: <code>apples</code>, <code>grapes</code>, and <code>bananas</code>",
|
||||
"testString": "assert(!foods.hasOwnProperty('oranges') && !foods.hasOwnProperty('plums') && !foods.hasOwnProperty('strawberries') && Object.keys(foods).length === 3, 'The <code>foods</code> object only has three keys: <code>apples</code>, <code>grapes</code>, and <code>bananas</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>oranges</code>, <code>plums</code>, and <code>strawberries</code> keys are removed using <code>delete</code>'",
|
||||
"testString": "assert(code.search(/oranges:/) !== -1 && code.search(/plums:/) !== -1 && code.search(/strawberries:/) !== -1, 'The <code>oranges</code>, <code>plums</code>, and <code>strawberries</code> keys are removed using <code>delete</code>')"
|
||||
"text": "The <code>oranges</code>, <code>plums</code>, and <code>strawberries</code> keys are removed using <code>delete</code>",
|
||||
"testString": "assert(code.search(/oranges:/) !== -1 && code.search(/plums:/) !== -1 && code.search(/strawberries:/) !== -1, 'The <code>oranges</code>, <code>plums</code>, and <code>strawberries</code> keys are removed using <code>delete</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -900,16 +900,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>'",
|
||||
"testString": "assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4, 'The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>')"
|
||||
"text": "The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>",
|
||||
"testString": "assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4, 'The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The function <code>isEveryoneHere</code> returns <code>true</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are properties on the <code>users</code> object'",
|
||||
"testString": "assert(isEveryoneHere(users) === true, 'The function <code>isEveryoneHere</code> returns <code>true</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are properties on the <code>users</code> object')"
|
||||
"text": "The function <code>isEveryoneHere</code> returns <code>true</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are properties on the <code>users</code> object",
|
||||
"testString": "assert(isEveryoneHere(users) === true, 'The function <code>isEveryoneHere</code> returns <code>true</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are properties on the <code>users</code> object');"
|
||||
},
|
||||
{
|
||||
"text": "The function <code>isEveryoneHere</code> returns <code>false</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are not properties on the <code>users</code> object'",
|
||||
"testString": "assert((function() { delete users.Alan; delete users.Jeff; delete users.Sarah; delete users.Ryan; return isEveryoneHere(users) })() === false, 'The function <code>isEveryoneHere</code> returns <code>false</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are not properties on the <code>users</code> object')"
|
||||
"text": "The function <code>isEveryoneHere</code> returns <code>false</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are not properties on the <code>users</code> object",
|
||||
"testString": "assert((function() { delete users.Alan; delete users.Jeff; delete users.Sarah; delete users.Ryan; return isEveryoneHere(users) })() === false, 'The function <code>isEveryoneHere</code> returns <code>false</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are not properties on the <code>users</code> object');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -968,12 +968,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>users</code> object contains users <code>Jeff</code> and <code>Ryan</code> with <code>online</code> set to <code>true</code> and users <code>Alan</code> and <code>Sarah</code> with <code>online</code> set to <code>false</code>'",
|
||||
"testString": "assert(users.Alan.online === false && users.Jeff.online === true && users.Sarah.online === false && users.Ryan.online === true, 'The <code>users</code> object contains users <code>Jeff</code> and <code>Ryan</code> with <code>online</code> set to <code>true</code> and users <code>Alan</code> and <code>Sarah</code> with <code>online</code> set to <code>false</code>')"
|
||||
"text": "The <code>users</code> object contains users <code>Jeff</code> and <code>Ryan</code> with <code>online</code> set to <code>true</code> and users <code>Alan</code> and <code>Sarah</code> with <code>online</code> set to <code>false</code>",
|
||||
"testString": "assert(users.Alan.online === false && users.Jeff.online === true && users.Sarah.online === false && users.Ryan.online === true, 'The <code>users</code> object contains users <code>Jeff</code> and <code>Ryan</code> with <code>online</code> set to <code>true</code> and users <code>Alan</code> and <code>Sarah</code> with <code>online</code> set to <code>false</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The function <code>countOnline</code> returns the number of users with the <code>online</code> property set to <code>true</code>'",
|
||||
"testString": "assert((function() { users.Harry = {online: true}; users.Sam = {online: true}; users.Carl = {online: true}; return countOnline(users) })() === 5, 'The function <code>countOnline</code> returns the number of users with the <code>online</code> property set to <code>true</code>')"
|
||||
"text": "The function <code>countOnline</code> returns the number of users with the <code>online</code> property set to <code>true</code>",
|
||||
"testString": "assert((function() { users.Harry = {online: true}; users.Sam = {online: true}; users.Carl = {online: true}; return countOnline(users) })() === 5, 'The function <code>countOnline</code> returns the number of users with the <code>online</code> property set to <code>true</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1029,12 +1029,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>'",
|
||||
"testString": "assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4, 'The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>')"
|
||||
"text": "The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>",
|
||||
"testString": "assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4, 'The <code>users</code> object only contains the keys <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code>');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>getArrayOfUsers</code> function returns an array which contains all the keys in the <code>users</code> object'",
|
||||
"testString": "assert((function() { users.Sam = {}; users.Lewis = {}; let R = getArrayOfUsers(users); return (R.indexOf('Alan') !== -1 && R.indexOf('Jeff') !== -1 && R.indexOf('Sarah') !== -1 && R.indexOf('Ryan') !== -1 && R.indexOf('Sam') !== -1 && R.indexOf('Lewis') !== -1); })() === true, 'The <code>getArrayOfUsers</code> function returns an array which contains all the keys in the <code>users</code> object')"
|
||||
"text": "The <code>getArrayOfUsers</code> function returns an array which contains all the keys in the <code>users</code> object",
|
||||
"testString": "assert((function() { users.Sam = {}; users.Lewis = {}; let R = getArrayOfUsers(users); return (R.indexOf('Alan') !== -1 && R.indexOf('Jeff') !== -1 && R.indexOf('Sarah') !== -1 && R.indexOf('Ryan') !== -1 && R.indexOf('Sam') !== -1 && R.indexOf('Lewis') !== -1); })() === true, 'The <code>getArrayOfUsers</code> function returns an array which contains all the keys in the <code>users</code> object');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1090,16 +1090,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>user</code> object has <code>name</code>, <code>age</code>, and <code>data</code> keys'",
|
||||
"testString": "assert('name' in user && 'age' in user && 'data' in user, 'The <code>user</code> object has <code>name</code>, <code>age</code>, and <code>data</code> keys')"
|
||||
"text": "The <code>user</code> object has <code>name</code>, <code>age</code>, and <code>data</code> keys",
|
||||
"testString": "assert('name' in user && 'age' in user && 'data' in user, 'The <code>user</code> object has <code>name</code>, <code>age</code>, and <code>data</code> keys');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>addFriend</code> function accepts a <code>user</code> object and a <code>friend</code> string as arguments and adds the friend to the array of <code>friends</code> in the <code>user</code> object'",
|
||||
"testString": "assert((function() { let L1 = user.data.friends.length; addFriend(user, 'The <code>addFriend</code> function accepts a <code>user</code> object and a <code>friend</code> string as arguments and adds the friend to the array of <code>friends</code> in the <code>user</code> object')"
|
||||
"text": "The <code>addFriend</code> function accepts a <code>user</code> object and a <code>friend</code> string as arguments and adds the friend to the array of <code>friends</code> in the <code>user</code> object",
|
||||
"testString": "assert((function() { let L1 = user.data.friends.length; addFriend(user, 'Sean'); let L2 = user.data.friends.length; return (L2 === L1 + 1); })(), 'The <code>addFriend</code> function accepts a <code>user</code> object and a <code>friend</code> string as arguments and adds the friend to the array of <code>friends</code> in the <code>user</code> object');"
|
||||
},
|
||||
{
|
||||
"text": "<code>addFriend(user, \"Pete\")</code> should return <code>[\"Sam\", \"Kira\", \"Tomo\", \"Pete\"]</code>'",
|
||||
"testString": "assert.deepEqual((function() { delete user.data.friends; user.data.friends = ['Sam', '<code>addFriend(user, \"Pete\")</code> should return <code>[\"Sam\", \"Kira\", \"Tomo\", \"Pete\"]</code>')"
|
||||
"text": "<code>addFriend(user, \"Pete\")</code> should return <code>[\"Sam\", \"Kira\", \"Tomo\", \"Pete\"]</code>",
|
||||
"testString": "assert.deepEqual((function() { delete user.data.friends; user.data.friends = ['Sam', 'Kira', 'Tomo']; return addFriend(user, 'Pete') })(), ['Sam', 'Kira', 'Tomo', 'Pete'], '<code>addFriend(user, \"Pete\")</code> should return <code>[\"Sam\", \"Kira\", \"Tomo\", \"Pete\"]</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,8 +18,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use <code>console.log()</code> to check the value of the variable <code>a</code>.'",
|
||||
"testString": "assert(code.match(/console\\.log\\(a\\)/g), 'Your code should use <code>console.log()</code> to check the value of the variable <code>a</code>.')"
|
||||
"text": "Your code should use <code>console.log()</code> to check the value of the variable <code>a</code>.",
|
||||
"testString": "assert(code.match(/console\\.log\\(a\\)/g), 'Your code should use <code>console.log()</code> to check the value of the variable <code>a</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -64,16 +64,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Use <code>console.log()</code> to print the <code>outputTwice</code> variable. In your Browser Console this should print out the value of the variable two times.'",
|
||||
"testString": "assert(code.match(/console\\.log\\(outputTwo\\)/g), 'Use <code>console.log()</code> to print the <code>outputTwice</code> variable. In your Browser Console this should print out the value of the variable two times.')"
|
||||
"text": "Use <code>console.log()</code> to print the <code>outputTwice</code> variable. In your Browser Console this should print out the value of the variable two times.",
|
||||
"testString": "assert(code.match(/console\\.log\\(outputTwo\\)/g), 'Use <code>console.log()</code> to print the <code>outputTwice</code> variable. In your Browser Console this should print out the value of the variable two times.');"
|
||||
},
|
||||
{
|
||||
"text": "Use <code>console.log()</code> to print the <code>outputOne</code> variable.'",
|
||||
"testString": "assert(code.match(/console\\.log\\(outputOne\\)/g), 'Use <code>console.log()</code> to print the <code>outputOne</code> variable.')"
|
||||
"text": "Use <code>console.log()</code> to print the <code>outputOne</code> variable.",
|
||||
"testString": "assert(code.match(/console\\.log\\(outputOne\\)/g), 'Use <code>console.log()</code> to print the <code>outputOne</code> variable.');"
|
||||
},
|
||||
{
|
||||
"text": "Use <code>console.clear()</code> to modify your output so that <code>outputOne</code> variable only outputs once.'",
|
||||
"testString": "assert(code.match(/console\\.clear\\(\\)/g), 'Use <code>console.clear()</code> to modify your output so that <code>outputOne</code> variable only outputs once.')"
|
||||
"text": "Use <code>console.clear()</code> to modify your output so that <code>outputOne</code> variable only outputs once.",
|
||||
"testString": "assert(code.match(/console\\.clear\\(\\)/g), 'Use <code>console.clear()</code> to modify your output so that <code>outputOne</code> variable only outputs once.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -119,16 +119,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use <code>typeof</code> in two <code>console.log()</code> statements to check the type of the variables.'",
|
||||
"testString": "assert(code.match(/console\\.log\\(typeof[\\( ].*\\)?\\)/g).length == 2, 'Your code should use <code>typeof</code> in two <code>console.log()</code> statements to check the type of the variables.')"
|
||||
"text": "Your code should use <code>typeof</code> in two <code>console.log()</code> statements to check the type of the variables.",
|
||||
"testString": "assert(code.match(/console\\.log\\(typeof[\\( ].*\\)?\\)/g).length == 2, 'Your code should use <code>typeof</code> in two <code>console.log()</code> statements to check the type of the variables.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use <code>typeof</code> to check the type of the variable <code>seven</code>.'",
|
||||
"testString": "assert(code.match(/typeof[\\( ]seven\\)?/g), 'Your code should use <code>typeof</code> to check the type of the variable <code>seven</code>.')"
|
||||
"text": "Your code should use <code>typeof</code> to check the type of the variable <code>seven</code>.",
|
||||
"testString": "assert(code.match(/typeof[\\( ]seven\\)?/g), 'Your code should use <code>typeof</code> to check the type of the variable <code>seven</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use <code>typeof</code> to check the type of the variable <code>three</code>.'",
|
||||
"testString": "assert(code.match(/typeof[\\( ]three\\)?/g), 'Your code should use <code>typeof</code> to check the type of the variable <code>three</code>.')"
|
||||
"text": "Your code should use <code>typeof</code> to check the type of the variable <code>three</code>.",
|
||||
"testString": "assert(code.match(/typeof[\\( ]three\\)?/g), 'Your code should use <code>typeof</code> to check the type of the variable <code>three</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -165,24 +165,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Check the spelling of the two variables used in the netWorkingCapital calculation, the console output should show that \"Net working capital is: 2\".'",
|
||||
"testString": "assert(netWorkingCapital === 2, 'Check the spelling of the two variables used in the netWorkingCapital calculation, the console output should show that \"Net working capital is: 2\".')"
|
||||
"text": "Check the spelling of the two variables used in the netWorkingCapital calculation, the console output should show that \"Net working capital is: 2\".",
|
||||
"testString": "assert(netWorkingCapital === 2, 'Check the spelling of the two variables used in the netWorkingCapital calculation, the console output should show that \"Net working capital is: 2\".');"
|
||||
},
|
||||
{
|
||||
"text": "There should be no instances of mis-spelled variables in the code.'",
|
||||
"testString": "assert(!code.match(/recievables/g), 'There should be no instances of mis-spelled variables in the code.')"
|
||||
"text": "There should be no instances of mis-spelled variables in the code.",
|
||||
"testString": "assert(!code.match(/recievables/g), 'There should be no instances of mis-spelled variables in the code.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>receivables</code> variable should be declared and used properly in the code.'",
|
||||
"testString": "assert(code.match(/receivables/g).length == 2, 'The <code>receivables</code> variable should be declared and used properly in the code.')"
|
||||
"text": "The <code>receivables</code> variable should be declared and used properly in the code.",
|
||||
"testString": "assert(code.match(/receivables/g).length == 2, 'The <code>receivables</code> variable should be declared and used properly in the code.');"
|
||||
},
|
||||
{
|
||||
"text": "There should be no instances of mis-spelled variables in the code.'",
|
||||
"testString": "assert(!code.match(/payable;/g), 'There should be no instances of mis-spelled variables in the code.')"
|
||||
"text": "There should be no instances of mis-spelled variables in the code.",
|
||||
"testString": "assert(!code.match(/payable;/g), 'There should be no instances of mis-spelled variables in the code.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>payables</code> variable should be declared and used properly in the code.'",
|
||||
"testString": "assert(code.match(/payables/g).length == 2, 'The <code>payables</code> variable should be declared and used properly in the code.')"
|
||||
"text": "The <code>payables</code> variable should be declared and used properly in the code.",
|
||||
"testString": "assert(code.match(/payables/g).length == 2, 'The <code>payables</code> variable should be declared and used properly in the code.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -218,12 +218,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should fix the missing piece of the array.'",
|
||||
"testString": "assert(code.match(/myArray\\s*?=\\s*?\\[\\s*?1\\s*?, 'Your code should fix the missing piece of the array.')"
|
||||
"text": "Your code should fix the missing piece of the array.",
|
||||
"testString": "assert(code.match(/myArray\\s*?=\\s*?\\[\\s*?1\\s*?,\\s*?2\\s*?,\\s*?3\\s*?\\];/g), 'Your code should fix the missing piece of the array.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that \"Sum of array values is: 6\".'",
|
||||
"testString": "assert(arraySum === 6, 'Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that \"Sum of array values is: 6\".')"
|
||||
"text": "Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that \"Sum of array values is: 6\".",
|
||||
"testString": "assert(arraySum === 6, 'Your code should fix the missing piece of the <code>.reduce()</code> method. The console output should show that \"Sum of array values is: 6\".');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -262,12 +262,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should fix the quotes around the <code>href</code> value \"#Home\" by either changing or escaping them.'",
|
||||
"testString": "assert(code.match(/<a href=\\s*?('|\\\\\")#Home\\1\\s*?>/g), 'Your code should fix the quotes around the <code>href</code> value \"#Home\" by either changing or escaping them.')"
|
||||
"text": "Your code should fix the quotes around the <code>href</code> value \"#Home\" by either changing or escaping them.",
|
||||
"testString": "assert(code.match(/<a href=\\s*?('|\\\\\")#Home\\1\\s*?>/g), 'Your code should fix the quotes around the <code>href</code> value \"#Home\" by either changing or escaping them.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should keep the double quotes around the entire string.'",
|
||||
"testString": "assert(code.match(/\"<p>.*?<\\/p>\";/g), 'Your code should keep the double quotes around the entire string.')"
|
||||
"text": "Your code should keep the double quotes around the entire string.",
|
||||
"testString": "assert(code.match(/\"<p>.*?<\\/p>\";/g), 'Your code should keep the double quotes around the entire string.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -304,12 +304,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should fix the condition so it checks for equality, instead of using assignment.'",
|
||||
"testString": "assert(result == \"Not equal!\", 'Your code should fix the condition so it checks for equality, instead of using assignment.')"
|
||||
"text": "Your code should fix the condition so it checks for equality, instead of using assignment.",
|
||||
"testString": "assert(result == \"Not equal!\", 'Your code should fix the condition so it checks for equality, instead of using assignment.');"
|
||||
},
|
||||
{
|
||||
"text": "The condition can use either <code>==</code> or <code>===</code> to test for equality.'",
|
||||
"testString": "assert(code.match(/x\\s*?===?\\s*?y/g), 'The condition can use either <code>==</code> or <code>===</code> to test for equality.')"
|
||||
"text": "The condition can use either <code>==</code> or <code>===</code> to test for equality.",
|
||||
"testString": "assert(code.match(/x\\s*?===?\\s*?y/g), 'The condition can use either <code>==</code> or <code>===</code> to test for equality.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -353,12 +353,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.'",
|
||||
"testString": "assert(result == 9, 'Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.')"
|
||||
"text": "Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.",
|
||||
"testString": "assert(result == 9, 'Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should call the <code>getNine</code> function.'",
|
||||
"testString": "assert(code.match(/getNine\\(\\)/g).length == 2, 'Your code should call the <code>getNine</code> function.')"
|
||||
"text": "Your code should call the <code>getNine</code> function.",
|
||||
"testString": "assert(code.match(/getNine\\(\\)/g).length == 2, 'Your code should call the <code>getNine</code> function.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -397,12 +397,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should fix the variable <code>power</code> so it equals 2 raised to the 3rd power, not 3 raised to the 2nd power.'",
|
||||
"testString": "assert(power == 8, 'Your code should fix the variable <code>power</code> so it equals 2 raised to the 3rd power, not 3 raised to the 2nd power.')"
|
||||
"text": "Your code should fix the variable <code>power</code> so it equals 2 raised to the 3rd power, not 3 raised to the 2nd power.",
|
||||
"testString": "assert(power == 8, 'Your code should fix the variable <code>power</code> so it equals 2 raised to the 3rd power, not 3 raised to the 2nd power.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the correct order of the arguments for the <code>raiseToPower</code> function call.'",
|
||||
"testString": "assert(code.match(/raiseToPower\\(\\s*?base\\s*?, 'Your code should use the correct order of the arguments for the <code>raiseToPower</code> function call.')"
|
||||
"text": "Your code should use the correct order of the arguments for the <code>raiseToPower</code> function call.",
|
||||
"testString": "assert(code.match(/raiseToPower\\(\\s*?base\\s*?,\\s*?exp\\s*?\\);/g), 'Your code should use the correct order of the arguments for the <code>raiseToPower</code> function call.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -443,20 +443,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the initial condition of the loop so it starts at the first index.'",
|
||||
"testString": "assert(code.match(/i\\s*?=\\s*?0\\s*?;/g).length == 1, 'Your code should set the initial condition of the loop so it starts at the first index.')"
|
||||
"text": "Your code should set the initial condition of the loop so it starts at the first index.",
|
||||
"testString": "assert(code.match(/i\\s*?=\\s*?0\\s*?;/g).length == 1, 'Your code should set the initial condition of the loop so it starts at the first index.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should fix the initial condition of the loop so that the index starts at 0.'",
|
||||
"testString": "assert(!code.match(/i\\s?=\\s*?1\\s*?;/g), 'Your code should fix the initial condition of the loop so that the index starts at 0.')"
|
||||
"text": "Your code should fix the initial condition of the loop so that the index starts at 0.",
|
||||
"testString": "assert(!code.match(/i\\s?=\\s*?1\\s*?;/g), 'Your code should fix the initial condition of the loop so that the index starts at 0.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should set the terminal condition of the loop so it stops at the last index.'",
|
||||
"testString": "assert(code.match(/i\\s*?<\\s*?len\\s*?;/g).length == 1, 'Your code should set the terminal condition of the loop so it stops at the last index.')"
|
||||
"text": "Your code should set the terminal condition of the loop so it stops at the last index.",
|
||||
"testString": "assert(code.match(/i\\s*?<\\s*?len\\s*?;/g).length == 1, 'Your code should set the terminal condition of the loop so it stops at the last index.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should fix the terminal condition of the loop so that it stops at 1 before the length.'",
|
||||
"testString": "assert(!code.match(/i\\s*?<=\\s*?len;/g), 'Your code should fix the terminal condition of the loop so that it stops at 1 before the length.')"
|
||||
"text": "Your code should fix the terminal condition of the loop so that it stops at 1 before the length.",
|
||||
"testString": "assert(!code.match(/i\\s*?<=\\s*?len;/g), 'Your code should fix the terminal condition of the loop so that it stops at 1 before the length.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -499,16 +499,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should set the <code>matrix</code> variable to an array holding 3 rows of 2 columns of zeroes each.'",
|
||||
"testString": "assert(JSON.stringify(matrix) == \"[[0, 'Your code should set the <code>matrix</code> variable to an array holding 3 rows of 2 columns of zeroes each.')"
|
||||
"text": "Your code should set the <code>matrix</code> variable to an array holding 3 rows of 2 columns of zeroes each.",
|
||||
"testString": "assert(JSON.stringify(matrix) == \"[[0,0],[0,0],[0,0]]\", 'Your code should set the <code>matrix</code> variable to an array holding 3 rows of 2 columns of zeroes each.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>matrix</code> variable should have 3 rows.'",
|
||||
"testString": "assert(matrix.length == 3, 'The <code>matrix</code> variable should have 3 rows.')"
|
||||
"text": "The <code>matrix</code> variable should have 3 rows.",
|
||||
"testString": "assert(matrix.length == 3, 'The <code>matrix</code> variable should have 3 rows.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>matrix</code> variable should have 2 columns in each row.'",
|
||||
"testString": "assert(matrix[0].length == 2 && matrix[1].length === 2 && matrix[2].length === 2, 'The <code>matrix</code> variable should have 2 columns in each row.')"
|
||||
"text": "The <code>matrix</code> variable should have 2 columns in each row.",
|
||||
"testString": "assert(matrix[0].length == 2 && matrix[1].length === 2 && matrix[2].length === 2, 'The <code>matrix</code> variable should have 2 columns in each row.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -561,12 +561,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should change the comparison operator in the terminal condition (the middle part) of the <code>for</code> loop.'",
|
||||
"testString": "assert(code.match(/i\\s*?<=\\s*?4;/g).length == 1, 'Your code should change the comparison operator in the terminal condition (the middle part) of the <code>for</code> loop.')"
|
||||
"text": "Your code should change the comparison operator in the terminal condition (the middle part) of the <code>for</code> loop.",
|
||||
"testString": "assert(code.match(/i\\s*?<=\\s*?4;/g).length == 1, 'Your code should change the comparison operator in the terminal condition (the middle part) of the <code>for</code> loop.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should fix the comparison operator in the terminal condition of the loop.'",
|
||||
"testString": "assert(!code.match(/i\\s*?!=\\s*?4;/g), 'Your code should fix the comparison operator in the terminal condition of the loop.')"
|
||||
"text": "Your code should fix the comparison operator in the terminal condition of the loop.",
|
||||
"testString": "assert(!code.match(/i\\s*?!=\\s*?4;/g), 'Your code should fix the comparison operator in the terminal condition of the loop.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
@ -25,16 +25,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>var</code> does not exist in code.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.')"
|
||||
"text": "<code>var</code> does not exist in code.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>catName</code> should be <code>Oliver</code>.'",
|
||||
"testString": "assert(catName === \"Oliver\", '<code>catName</code> should be <code>Oliver</code>.')"
|
||||
"text": "<code>catName</code> should be <code>Oliver</code>.",
|
||||
"testString": "assert(catName === \"Oliver\", '<code>catName</code> should be <code>Oliver</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>quote</code> should be <code>\"Oliver says Meow!\"</code>'",
|
||||
"testString": "assert(quote === \"Oliver says Meow!\", '<code>quote</code> should be <code>\"Oliver says Meow!\"</code>')"
|
||||
"text": "<code>quote</code> should be <code>\"Oliver says Meow!\"</code>",
|
||||
"testString": "assert(quote === \"Oliver says Meow!\", '<code>quote</code> should be <code>\"Oliver says Meow!\"</code>');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -84,16 +84,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>var</code> does not exist in code.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.')"
|
||||
"text": "<code>var</code> does not exist in code.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.');"
|
||||
},
|
||||
{
|
||||
"text": "The variable <code>i</code> declared in the if statement should equal \"block scope\".'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(i\\s*=\\s*).*\\s*.*\\s*.*\\1('|\")block\\s*scope\\2/g), 'The variable <code>i</code> declared in the if statement should equal \"block scope\".')"
|
||||
"text": "The variable <code>i</code> declared in the if statement should equal \"block scope\".",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(i\\s*=\\s*).*\\s*.*\\s*.*\\1('|\")block\\s*scope\\2/g), 'The variable <code>i</code> declared in the if statement should equal \"block scope\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkScope()</code> should return \"function scope\"'",
|
||||
"testString": "assert(checkScope() === \"function scope\", '<code>checkScope()</code> should return \"function scope\"')"
|
||||
"text": "<code>checkScope()</code> should return \"function scope\"",
|
||||
"testString": "assert(checkScope() === \"function scope\", '<code>checkScope()</code> should return \"function scope\"');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -136,16 +136,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>var</code> does not exist in code.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.')"
|
||||
"text": "<code>var</code> does not exist in code.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), '<code>var</code> does not exist in code.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>SENTENCE</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(const SENTENCE)/g), '<code>SENTENCE</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>SENTENCE</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(const SENTENCE)/g), '<code>SENTENCE</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>i</code> should be a variable only defined within the for loop scope (by using<code>let</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(let i)/g), '<code>i</code> should be a variable only defined within the for loop scope (by using<code>let</code>).')"
|
||||
"text": "<code>i</code> should be a variable only defined within the for loop scope (by using<code>let</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/(let i)/g), '<code>i</code> should be a variable only defined within the for loop scope (by using<code>let</code>).');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -192,20 +192,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Do not replace <code>const</code> keyword.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const/g), 'Do not replace <code>const</code> keyword.')"
|
||||
"text": "Do not replace <code>const</code> keyword.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const/g), 'Do not replace <code>const</code> keyword.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>s</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+s/g), '<code>s</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>s</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+s/g), '<code>s</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "Do not change the original array declaration.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+s\\s*=\\s*\\[\\s*5\\s*, 'Do not change the original array declaration.')"
|
||||
"text": "Do not change the original array declaration.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+s\\s*=\\s*\\[\\s*5\\s*,\\s*7\\s*,\\s*2\\s*\\]\\s*;?/g), 'Do not change the original array declaration.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>s</code> should be equal to <code>[2, 5, 7]</code>.'",
|
||||
"testString": "assert.deepEqual(s, '<code>s</code> should be equal to <code>[2, 5, 7]</code>.')"
|
||||
"text": "<code>s</code> should be equal to <code>[2, 5, 7]</code>.",
|
||||
"testString": "assert.deepEqual(s, [2, 5, 7], '<code>s</code> should be equal to <code>[2, 5, 7]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -246,20 +246,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Do not replace <code>const</code> keyword.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const/g), 'Do not replace <code>const</code> keyword.')"
|
||||
"text": "Do not replace <code>const</code> keyword.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const/g), 'Do not replace <code>const</code> keyword.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>MATH_CONSTANTS</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+MATH_CONSTANTS/g), '<code>MATH_CONSTANTS</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>MATH_CONSTANTS</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+MATH_CONSTANTS/g), '<code>MATH_CONSTANTS</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "Do not change original <code>MATH_CONSTANTS</code>.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+MATH_CONSTANTS\\s+=\\s+{\\s+PI:\\s+3.14\\s+};/g), 'Do not change original <code>MATH_CONSTANTS</code>.')"
|
||||
"text": "Do not change original <code>MATH_CONSTANTS</code>.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+MATH_CONSTANTS\\s+=\\s+{\\s+PI:\\s+3.14\\s+};/g), 'Do not change original <code>MATH_CONSTANTS</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>PI</code> equals <code>3.14</code>.'",
|
||||
"testString": "assert(PI === 3.14, '<code>PI</code> equals <code>3.14</code>.')"
|
||||
"text": "<code>PI</code> equals <code>3.14</code>.",
|
||||
"testString": "assert(PI === 3.14, '<code>PI</code> equals <code>3.14</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -312,24 +312,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "User did replace <code>var</code> keyword.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.')"
|
||||
"text": "User did replace <code>var</code> keyword.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>magic</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+magic/g), '<code>magic</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>magic</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+magic/g), '<code>magic</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>magic</code> is a <code>function</code>.'",
|
||||
"testString": "assert(typeof magic === 'function', '<code>magic</code> is a <code>function</code>.')"
|
||||
"text": "<code>magic</code> is a <code>function</code>.",
|
||||
"testString": "assert(typeof magic === 'function', '<code>magic</code> is a <code>function</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>magic()</code> returns correct date.'",
|
||||
"testString": "assert(magic().getDate() == new Date().getDate(), '<code>magic()</code> returns correct date.')"
|
||||
"text": "<code>magic()</code> returns correct date.",
|
||||
"testString": "assert(magic().getDate() == new Date().getDate(), '<code>magic()</code> returns correct date.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>function</code> keyword was not used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.')"
|
||||
"text": "<code>function</code> keyword was not used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -364,24 +364,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "User did replace <code>var</code> keyword.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.')"
|
||||
"text": "User did replace <code>var</code> keyword.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myConcat</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+myConcat/g), '<code>myConcat</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>myConcat</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+myConcat/g), '<code>myConcat</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myConcat</code> should be a function'",
|
||||
"testString": "assert(typeof myConcat === 'function', '<code>myConcat</code> should be a function')"
|
||||
"text": "<code>myConcat</code> should be a function",
|
||||
"testString": "assert(typeof myConcat === 'function', '<code>myConcat</code> should be a function');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myConcat()</code> returns the correct <code>array</code>'",
|
||||
"testString": "assert(() => { const a = myConcat([1], '<code>myConcat()</code> returns the correct <code>array</code>')"
|
||||
"text": "<code>myConcat()</code> returns the correct <code>array</code>",
|
||||
"testString": "assert(() => { const a = myConcat([1], [2]); return a[0] == 1 && a[1] == 2; }, '<code>myConcat()</code> returns the correct <code>array</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>function</code> keyword was not used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.')"
|
||||
"text": "<code>function</code> keyword was not used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -422,32 +422,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "User did replace <code>var</code> keyword.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.')"
|
||||
"text": "User did replace <code>var</code> keyword.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/var/g), 'User did replace <code>var</code> keyword.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>squaredIntegers</code> should be a constant variable (by using <code>const</code>).'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+squaredIntegers/g), '<code>squaredIntegers</code> should be a constant variable (by using <code>const</code>).')"
|
||||
"text": "<code>squaredIntegers</code> should be a constant variable (by using <code>const</code>).",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/const\\s+squaredIntegers/g), '<code>squaredIntegers</code> should be a constant variable (by using <code>const</code>).');"
|
||||
},
|
||||
{
|
||||
"text": "<code>squaredIntegers</code> should be an <code>array</code>'",
|
||||
"testString": "assert(Array.isArray(squaredIntegers), '<code>squaredIntegers</code> should be an <code>array</code>')"
|
||||
"text": "<code>squaredIntegers</code> should be an <code>array</code>",
|
||||
"testString": "assert(Array.isArray(squaredIntegers), '<code>squaredIntegers</code> should be an <code>array</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>squaredIntegers</code> should be <code>[16, 1764, 36]</code>'",
|
||||
"testString": "assert(squaredIntegers[0] === 16 && squaredIntegers[1] === 1764 && squaredIntegers[2] === 36, '<code>squaredIntegers</code> should be <code>[16, 1764, 36]</code>')"
|
||||
"text": "<code>squaredIntegers</code> should be <code>[16, 1764, 36]</code>",
|
||||
"testString": "assert(squaredIntegers[0] === 16 && squaredIntegers[1] === 1764 && squaredIntegers[2] === 36, '<code>squaredIntegers</code> should be <code>[16, 1764, 36]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>function</code> keyword was not used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.')"
|
||||
"text": "<code>function</code> keyword was not used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.');"
|
||||
},
|
||||
{
|
||||
"text": "loop should not be used'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/(for)|(while)/g), 'loop should not be used')"
|
||||
"text": "loop should not be used",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/(for)|(while)/g), 'loop should not be used');"
|
||||
},
|
||||
{
|
||||
"text": "<code>map</code>, <code>filter</code>, or <code>reduce</code> should be used'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/map|filter|reduce/g), '<code>map</code>, <code>filter</code>, or <code>reduce</code> should be used')"
|
||||
"text": "<code>map</code>, <code>filter</code>, or <code>reduce</code> should be used",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/map|filter|reduce/g), '<code>map</code>, <code>filter</code>, or <code>reduce</code> should be used');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -490,16 +490,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The result of <code>increment(5, 2)</code> should be <code>7</code>.'",
|
||||
"testString": "assert(increment(5, 'The result of <code>increment(5, 2)</code> should be <code>7</code>.')"
|
||||
"text": "The result of <code>increment(5, 2)</code> should be <code>7</code>.",
|
||||
"testString": "assert(increment(5, 2) === 7, 'The result of <code>increment(5, 2)</code> should be <code>7</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The result of <code>increment(5)</code> should be <code>6</code>.'",
|
||||
"testString": "assert(increment(5) === 6, 'The result of <code>increment(5)</code> should be <code>6</code>.')"
|
||||
"text": "The result of <code>increment(5)</code> should be <code>6</code>.",
|
||||
"testString": "assert(increment(5) === 6, 'The result of <code>increment(5)</code> should be <code>6</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "default parameter <code>1</code> was used for <code>value</code>.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/value\\s*=\\s*1/g), 'default parameter <code>1</code> was used for <code>value</code>.')"
|
||||
"text": "default parameter <code>1</code> was used for <code>value</code>.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/value\\s*=\\s*1/g), 'default parameter <code>1</code> was used for <code>value</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -539,24 +539,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The result of <code>sum(0,1,2)</code> should be 3'",
|
||||
"testString": "assert(sum(0, 'The result of <code>sum(0,1,2)</code> should be 3')"
|
||||
"text": "The result of <code>sum(0,1,2)</code> should be 3",
|
||||
"testString": "assert(sum(0,1,2) === 3, 'The result of <code>sum(0,1,2)</code> should be 3');"
|
||||
},
|
||||
{
|
||||
"text": "The result of <code>sum(1,2,3,4)</code> should be 10'",
|
||||
"testString": "assert(sum(1, 'The result of <code>sum(1,2,3,4)</code> should be 10')"
|
||||
"text": "The result of <code>sum(1,2,3,4)</code> should be 10",
|
||||
"testString": "assert(sum(1,2,3,4) === 10, 'The result of <code>sum(1,2,3,4)</code> should be 10');"
|
||||
},
|
||||
{
|
||||
"text": "The result of <code>sum(5)</code> should be 5'",
|
||||
"testString": "assert(sum(5) === 5, 'The result of <code>sum(5)</code> should be 5')"
|
||||
"text": "The result of <code>sum(5)</code> should be 5",
|
||||
"testString": "assert(sum(5) === 5, 'The result of <code>sum(5)</code> should be 5');"
|
||||
},
|
||||
{
|
||||
"text": "The result of <code>sum()</code> should be 0'",
|
||||
"testString": "assert(sum() === 0, 'The result of <code>sum()</code> should be 0')"
|
||||
"text": "The result of <code>sum()</code> should be 0",
|
||||
"testString": "assert(sum() === 0, 'The result of <code>sum()</code> should be 0');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>sum</code> function uses the <code>...</code> spread operator on the <code>args</code> parameter.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/function\\s+sum\\s*\\(\\s*...args\\s*\\)\\s*{/g), 'The <code>sum</code> function uses the <code>...</code> spread operator on the <code>args</code> parameter.')"
|
||||
"text": "The <code>sum</code> function uses the <code>...</code> spread operator on the <code>args</code> parameter.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/function\\s+sum\\s*\\(\\s*...args\\s*\\)\\s*{/g), 'The <code>sum</code> function uses the <code>...</code> spread operator on the <code>args</code> parameter.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -601,16 +601,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>arr2</code> is correct copy of <code>arr1</code>.'",
|
||||
"testString": "assert(arr2.every((v, '<code>arr2</code> is correct copy of <code>arr1</code>.')"
|
||||
"text": "<code>arr2</code> is correct copy of <code>arr1</code>.",
|
||||
"testString": "assert(arr2.every((v, i) => v === arr1[i]), '<code>arr2</code> is correct copy of <code>arr1</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>...</code> spread operator was used to duplicate <code>arr1</code>.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*...arr1\\s*\\]/g), '<code>...</code> spread operator was used to duplicate <code>arr1</code>.')"
|
||||
"text": "<code>...</code> spread operator was used to duplicate <code>arr1</code>.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*...arr1\\s*\\]/g), '<code>...</code> spread operator was used to duplicate <code>arr1</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>arr2</code> remains unchanged when <code>arr1</code> is changed.'",
|
||||
"testString": "assert((arr1, '<code>arr2</code> remains unchanged when <code>arr1</code> is changed.')"
|
||||
"text": "<code>arr2</code> remains unchanged when <code>arr1</code> is changed.",
|
||||
"testString": "assert((arr1, arr2) => {arr1.push('JUN'); return arr2.length < arr1.length}, '<code>arr2</code> remains unchanged when <code>arr1</code> is changed.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -654,16 +654,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "the function <code>getLength()</code> returns a number.'",
|
||||
"testString": "assert(typeof getLength('') === 'number', 'the function <code>getLength()</code> returns a number.')"
|
||||
"text": "the function <code>getLength()</code> returns a number.",
|
||||
"testString": "assert(typeof getLength('') === 'number', 'the function <code>getLength()</code> returns a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>getLength(\"FreeCodeCamp\")</code> should be <code>12</code>'",
|
||||
"testString": "assert(getLength(\"FreeCodeCamp\") === 12, '<code>getLength(\"FreeCodeCamp\")</code> should be <code>12</code>')"
|
||||
"text": "<code>getLength(\"FreeCodeCamp\")</code> should be <code>12</code>",
|
||||
"testString": "assert(getLength(\"FreeCodeCamp\") === 12, '<code>getLength(\"FreeCodeCamp\")</code> should be <code>12</code>');"
|
||||
},
|
||||
{
|
||||
"text": "destructuring with reassignment was used'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*length\\s*:\\s*len\\s*}\\s*=\\s*str/g), 'destructuring with reassignment was used')"
|
||||
"text": "destructuring with reassignment was used",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*length\\s*:\\s*len\\s*}\\s*=\\s*str/g), 'destructuring with reassignment was used');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -707,12 +707,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>maxOfTomorrow</code> equals <code>84.6</code>'",
|
||||
"testString": "assert(getMaxOfTmrw(LOCAL_FORECAST) === 84.6, '<code>maxOfTomorrow</code> equals <code>84.6</code>')"
|
||||
"text": "<code>maxOfTomorrow</code> equals <code>84.6</code>",
|
||||
"testString": "assert(getMaxOfTmrw(LOCAL_FORECAST) === 84.6, '<code>maxOfTomorrow</code> equals <code>84.6</code>');"
|
||||
},
|
||||
{
|
||||
"text": "nested destructuring was used'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*tomorrow\\s*:\\s*\\{\\s*max\\s*:\\s*maxOfTomorrow\\s*\\}\\s*\\}\\s*=\\s*forecast/g), 'nested destructuring was used')"
|
||||
"text": "nested destructuring was used",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*tomorrow\\s*:\\s*\\{\\s*max\\s*:\\s*maxOfTomorrow\\s*\\}\\s*\\}\\s*=\\s*forecast/g), 'nested destructuring was used');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -761,16 +761,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Value of <code>a</code> should be 6, after swapping.'",
|
||||
"testString": "assert(a === 6, 'Value of <code>a</code> should be 6, after swapping.')"
|
||||
"text": "Value of <code>a</code> should be 6, after swapping.",
|
||||
"testString": "assert(a === 6, 'Value of <code>a</code> should be 6, after swapping.');"
|
||||
},
|
||||
{
|
||||
"text": "Value of <code>b</code> should be 8, after swapping.'",
|
||||
"testString": "assert(b === 8, 'Value of <code>b</code> should be 8, after swapping.')"
|
||||
"text": "Value of <code>b</code> should be 8, after swapping.",
|
||||
"testString": "assert(b === 8, 'Value of <code>b</code> should be 8, after swapping.');"
|
||||
},
|
||||
{
|
||||
"text": "Use array destructuring to swap a and b.'",
|
||||
"testString": "// assert(/\\[\\s*(\\w)\\s*, 'Use array destructuring to swap a and b.')"
|
||||
"text": "Use array destructuring to swap a and b.",
|
||||
"testString": "// assert(/\\[\\s*(\\w)\\s*,\\s*(\\w)\\s*\\]\\s*=\\s*\\[\\s*\\2\\s*,\\s*\\1\\s*\\]/g.test(code), 'Use array destructuring to swap a and b.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -812,16 +812,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>arr</code> should be <code>[3,4,5,6,7,8,9,10]</code>'",
|
||||
"testString": "assert(arr.every((v, '<code>arr</code> should be <code>[3,4,5,6,7,8,9,10]</code>')"
|
||||
"text": "<code>arr</code> should be <code>[3,4,5,6,7,8,9,10]</code>",
|
||||
"testString": "assert(arr.every((v, i) => v === i + 3), '<code>arr</code> should be <code>[3,4,5,6,7,8,9,10]</code>');"
|
||||
},
|
||||
{
|
||||
"text": "destructuring was used.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*\\w\\s*, 'destructuring was used.')"
|
||||
"text": "destructuring was used.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\[\\s*\\w\\s*,\\s*\\w\\s*,\\s*...arr\\s*\\]/g), 'destructuring was used.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Array.slice()</code> was not used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/Array.slice/g), '<code>Array.slice()</code> was not used.')"
|
||||
"text": "<code>Array.slice()</code> was not used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/Array.slice/g), '<code>Array.slice()</code> was not used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -867,16 +867,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>stats</code> should be an <code>object</code>.'",
|
||||
"testString": "assert(typeof stats === 'object', '<code>stats</code> should be an <code>object</code>.')"
|
||||
"text": "<code>stats</code> should be an <code>object</code>.",
|
||||
"testString": "assert(typeof stats === 'object', '<code>stats</code> should be an <code>object</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>half(stats)</code> should be <code>28.015</code>'",
|
||||
"testString": "assert(half(stats) === 28.015, '<code>half(stats)</code> should be <code>28.015</code>')"
|
||||
"text": "<code>half(stats)</code> should be <code>28.015</code>",
|
||||
"testString": "assert(half(stats) === 28.015, '<code>half(stats)</code> should be <code>28.015</code>');"
|
||||
},
|
||||
{
|
||||
"text": "Destructuring was used.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\(\\s*\\{\\s*\\w+\\s*, 'Destructuring was used.')"
|
||||
"text": "Destructuring was used.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\(\\s*\\{\\s*\\w+\\s*,\\s*\\w+\\s*\\}\\s*\\)/g), 'Destructuring was used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -932,16 +932,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>resultDisplayArray</code> is a list containing <code>result failure</code> messages.'",
|
||||
"testString": "assert(typeof makeList(result.failure) === 'object' && resultDisplayArray.length === 3, '<code>resultDisplayArray</code> is a list containing <code>result failure</code> messages.')"
|
||||
"text": "<code>resultDisplayArray</code> is a list containing <code>result failure</code> messages.",
|
||||
"testString": "assert(typeof makeList(result.failure) === 'object' && resultDisplayArray.length === 3, '<code>resultDisplayArray</code> is a list containing <code>result failure</code> messages.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>resultDisplayArray</code> is the desired output.'",
|
||||
"testString": "assert(makeList(result.failure).every((v, '<code>resultDisplayArray</code> is the desired output.')"
|
||||
"text": "<code>resultDisplayArray</code> is the desired output.",
|
||||
"testString": "assert(makeList(result.failure).every((v, i) => v === `<li class=\"text-warning\">${result.failure[i]}</li>`), '<code>resultDisplayArray</code> is the desired output.');"
|
||||
},
|
||||
{
|
||||
"text": "Template strings were used'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\`<li class=\"text-warning\">\\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used')"
|
||||
"text": "Template strings were used",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/\\`<li class=\"text-warning\">\\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -997,12 +997,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "the output is <code>{name: \"Zodiac Hasbro\", age: 56, gender: \"male\"}</code>.'",
|
||||
"testString": "assert(() => {const res={name:\"Zodiac Hasbro\", 'the output is <code>{name: \"Zodiac Hasbro\", age: 56, gender: \"male\"}</code>.')"
|
||||
"text": "the output is <code>{name: \"Zodiac Hasbro\", age: 56, gender: \"male\"}</code>.",
|
||||
"testString": "assert(() => {const res={name:\"Zodiac Hasbro\",age:56,gender:\"male\"}; const person=createPerson(\"Zodiac Hasbro\", 56, \"male\"); return Object.keys(person).every(k => person[k] === res[k]);}, 'the output is <code>{name: \"Zodiac Hasbro\", age: 56, gender: \"male\"}</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "No <code>:</code> were used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/:/g), 'No <code>:</code> were used.')"
|
||||
"text": "No <code>:</code> were used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/:/g), 'No <code>:</code> were used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1045,12 +1045,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>setGear</code> is a function and changes the <code>gear</code> variable.'",
|
||||
"testString": "assert(() => { bicycle.setGear(48); return bicycle.gear === 48 }, '<code>setGear</code> is a function and changes the <code>gear</code> variable.')"
|
||||
"text": "<code>setGear</code> is a function and changes the <code>gear</code> variable.",
|
||||
"testString": "assert(() => { bicycle.setGear(48); return bicycle.gear === 48 }, '<code>setGear</code> is a function and changes the <code>gear</code> variable.');"
|
||||
},
|
||||
{
|
||||
"text": "Declarative function was used.'",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/:\\s*function\\s*\\(\\)/g), 'Declarative function was used.')"
|
||||
"text": "Declarative function was used.",
|
||||
"testString": "getUserInput => assert(!getUserInput('index').match(/:\\s*function\\s*\\(\\)/g), 'Declarative function was used.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1097,16 +1097,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Vegetable</code> should be a <code>class</code> with a defined <code>constructor</code> method.'",
|
||||
"testString": "assert(typeof Vegetable === 'function' && typeof Vegetable.constructor === 'function', '<code>Vegetable</code> should be a <code>class</code> with a defined <code>constructor</code> method.')"
|
||||
"text": "<code>Vegetable</code> should be a <code>class</code> with a defined <code>constructor</code> method.",
|
||||
"testString": "assert(typeof Vegetable === 'function' && typeof Vegetable.constructor === 'function', '<code>Vegetable</code> should be a <code>class</code> with a defined <code>constructor</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>class</code> keyword was used.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/class/g), '<code>class</code> keyword was used.')"
|
||||
"text": "<code>class</code> keyword was used.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/class/g), '<code>class</code> keyword was used.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Vegetable</code> can be instantiated.'",
|
||||
"testString": "assert(() => {const a = new Vegetable(\"apple\"); return typeof a === 'object';}, '<code>Vegetable</code> can be instantiated.')"
|
||||
"text": "<code>Vegetable</code> can be instantiated.",
|
||||
"testString": "assert(() => {const a = new Vegetable(\"apple\"); return typeof a === 'object';}, '<code>Vegetable</code> can be instantiated.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1157,16 +1157,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Thermostat</code> should be a <code>class</code> with a defined <code>constructor</code> method.'",
|
||||
"testString": "assert(typeof Thermostat === 'function' && typeof Thermostat.constructor === 'function', '<code>Thermostat</code> should be a <code>class</code> with a defined <code>constructor</code> method.')"
|
||||
"text": "<code>Thermostat</code> should be a <code>class</code> with a defined <code>constructor</code> method.",
|
||||
"testString": "assert(typeof Thermostat === 'function' && typeof Thermostat.constructor === 'function', '<code>Thermostat</code> should be a <code>class</code> with a defined <code>constructor</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>class</code> keyword was used.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/class/g), '<code>class</code> keyword was used.')"
|
||||
"text": "<code>class</code> keyword was used.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/class/g), '<code>class</code> keyword was used.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Thermostat</code> can be instantiated.'",
|
||||
"testString": "assert(() => {const t = new Thermostat(32); return typeof t === 'object' && t.temperature === 0;}, '<code>Thermostat</code> can be instantiated.')"
|
||||
"text": "<code>Thermostat</code> can be instantiated.",
|
||||
"testString": "assert(() => {const t = new Thermostat(32); return typeof t === 'object' && t.temperature === 0;}, '<code>Thermostat</code> can be instantiated.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1216,8 +1216,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "valid <code>import</code> statement'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\{\\s?capitalizeString\\s?\\}\\s+from\\s+\"string_functions\"/g), 'valid <code>import</code> statement')"
|
||||
"text": "valid <code>import</code> statement",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\{\\s?capitalizeString\\s?\\}\\s+from\\s+\"string_functions\"/g), 'valid <code>import</code> statement');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1253,12 +1253,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>foo</code> is exported.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+const\\s+foo\\s+=+\\s\"bar\"/g), '<code>foo</code> is exported.')"
|
||||
"text": "<code>foo</code> is exported.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+const\\s+foo\\s+=+\\s\"bar\"/g), '<code>foo</code> is exported.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bar</code> is exported.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+const\\s+boo\\s+=+\\s\"far\"/g), '<code>bar</code> is exported.')"
|
||||
"text": "<code>bar</code> is exported.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+const\\s+boo\\s+=+\\s\"far\"/g), '<code>bar</code> is exported.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1295,8 +1295,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Properly uses <code>import * as</code> syntax.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\*\\s+as\\s+myStringModule\\s+from\\s+\"capitalize_strings\"/g), 'Properly uses <code>import * as</code> syntax.')"
|
||||
"text": "Properly uses <code>import * as</code> syntax.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\*\\s+as\\s+myStringModule\\s+from\\s+\"capitalize_strings\"/g), 'Properly uses <code>import * as</code> syntax.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1332,8 +1332,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Proper used of <code>export</code> fallback.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+default\\s+function\\s+subtract\\(x, 'Proper used of <code>export</code> fallback.')"
|
||||
"text": "Proper used of <code>export</code> fallback.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+default\\s+function\\s+subtract\\(x,y\\)\\s+{return\\s+x\\s-\\s+y;}/g), 'Proper used of <code>export</code> fallback.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -1367,8 +1367,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Properly imports <code>export default</code> method.'",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+subtract\\s+from\\s+\"math_functions\"/g), 'Properly imports <code>export default</code> method.')"
|
||||
"text": "Properly imports <code>export default</code> method.",
|
||||
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+subtract\\s+from\\s+\"math_functions\"/g), 'Properly imports <code>export default</code> method.');"
|
||||
}
|
||||
],
|
||||
"type": "waypoint",
|
||||
|
@ -20,12 +20,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>tea4TeamFCC</code> variable should hold 40 cups of tea for the team.'",
|
||||
"testString": "assert(tea4TeamFCC.length === 40, 'The <code>tea4TeamFCC</code> variable should hold 40 cups of tea for the team.')"
|
||||
"text": "The <code>tea4TeamFCC</code> variable should hold 40 cups of tea for the team.",
|
||||
"testString": "assert(tea4TeamFCC.length === 40, 'The <code>tea4TeamFCC</code> variable should hold 40 cups of tea for the team.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>tea4TeamFCC</code> variable should hold cups of green tea.'",
|
||||
"testString": "assert(tea4TeamFCC[0] === 'greenTea', 'The <code>tea4TeamFCC</code> variable should hold cups of green tea.')"
|
||||
"text": "The <code>tea4TeamFCC</code> variable should hold cups of green tea.",
|
||||
"testString": "assert(tea4TeamFCC[0] === 'greenTea', 'The <code>tea4TeamFCC</code> variable should hold cups of green tea.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -91,20 +91,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>tea4GreenTeamFCC</code> variable should hold 27 cups of green tea for the team.'",
|
||||
"testString": "assert(tea4GreenTeamFCC.length === 27, 'The <code>tea4GreenTeamFCC</code> variable should hold 27 cups of green tea for the team.')"
|
||||
"text": "The <code>tea4GreenTeamFCC</code> variable should hold 27 cups of green tea for the team.",
|
||||
"testString": "assert(tea4GreenTeamFCC.length === 27, 'The <code>tea4GreenTeamFCC</code> variable should hold 27 cups of green tea for the team.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>tea4GreenTeamFCC</code> variable should hold cups of green tea.'",
|
||||
"testString": "assert(tea4GreenTeamFCC[0] === 'greenTea', 'The <code>tea4GreenTeamFCC</code> variable should hold cups of green tea.')"
|
||||
"text": "The <code>tea4GreenTeamFCC</code> variable should hold cups of green tea.",
|
||||
"testString": "assert(tea4GreenTeamFCC[0] === 'greenTea', 'The <code>tea4GreenTeamFCC</code> variable should hold cups of green tea.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>tea4BlackTeamFCC</code> variable should hold 13 cups of black tea.'",
|
||||
"testString": "assert(tea4BlackTeamFCC.length === 13, 'The <code>tea4BlackTeamFCC</code> variable should hold 13 cups of black tea.')"
|
||||
"text": "The <code>tea4BlackTeamFCC</code> variable should hold 13 cups of black tea.",
|
||||
"testString": "assert(tea4BlackTeamFCC.length === 13, 'The <code>tea4BlackTeamFCC</code> variable should hold 13 cups of black tea.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>tea4BlackTeamFCC</code> variable should hold cups of black tea.'",
|
||||
"testString": "assert(tea4BlackTeamFCC[0] === 'blackTea', 'The <code>tea4BlackTeamFCC</code> variable should hold cups of black tea.')"
|
||||
"text": "The <code>tea4BlackTeamFCC</code> variable should hold cups of black tea.",
|
||||
"testString": "assert(tea4BlackTeamFCC[0] === 'blackTea', 'The <code>tea4BlackTeamFCC</code> variable should hold cups of black tea.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -182,8 +182,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Move ahead to understand the error.'",
|
||||
"testString": "assert(true, 'Move ahead to understand the error.')"
|
||||
"text": "Move ahead to understand the error.",
|
||||
"testString": "assert(true, 'Move ahead to understand the error.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -256,12 +256,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.'",
|
||||
"testString": "assert(fixedValue === 4, 'Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.')"
|
||||
"text": "Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.",
|
||||
"testString": "assert(fixedValue === 4, 'Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.'",
|
||||
"testString": "assert(newValue === 5, 'Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.')"
|
||||
"text": "Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.",
|
||||
"testString": "assert(newValue === 5, 'Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -309,16 +309,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.'",
|
||||
"testString": "assert(fixedValue === 4, 'Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.')"
|
||||
"text": "Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.",
|
||||
"testString": "assert(fixedValue === 4, 'Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>incrementer</code> function should take a parameter.'",
|
||||
"testString": "assert(code.match(/function\\s+?incrementer\\s*?\\(.+?\\)/g), 'Your <code>incrementer</code> function should take a parameter.')"
|
||||
"text": "Your <code>incrementer</code> function should take a parameter.",
|
||||
"testString": "assert(code.match(/function\\s+?incrementer\\s*?\\(.+?\\)/g), 'Your <code>incrementer</code> function should take a parameter.');"
|
||||
},
|
||||
{
|
||||
"text": "Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.'",
|
||||
"testString": "assert(newValue === 5, 'Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.')"
|
||||
"text": "Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.",
|
||||
"testString": "assert(newValue === 5, 'Your <code>incrementer</code> function should return a value that is one larger than the <code>fixedValue</code> value.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -363,20 +363,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>bookList</code> should not change and still equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(bookList) === JSON.stringify([\"The Hound of the Baskervilles\", '<code>bookList</code> should not change and still equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.')"
|
||||
"text": "<code>bookList</code> should not change and still equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(bookList) === JSON.stringify([\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]), '<code>bookList</code> should not change and still equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>newBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(newBookList) === JSON.stringify(['The Hound of the Baskervilles', '<code>newBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.')"
|
||||
"text": "<code>newBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(newBookList) === JSON.stringify(['The Hound of the Baskervilles', 'On The Electrodynamics of Moving Bodies', 'Philosophiæ Naturalis Principia Mathematica', 'Disquisitiones Arithmeticae', 'A Brief History of Time']), '<code>newBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"On The Electrodynamics of Moving Bodies\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>newerBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(newerBookList) === JSON.stringify(['The Hound of the Baskervilles', '<code>newerBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.')"
|
||||
"text": "<code>newerBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(newerBookList) === JSON.stringify(['The Hound of the Baskervilles', 'Philosophiæ Naturalis Principia Mathematica', 'Disquisitiones Arithmeticae']), '<code>newerBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>newestBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(newestBookList) === JSON.stringify(['The Hound of the Baskervilles', '<code>newestBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.')"
|
||||
"text": "<code>newestBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(newestBookList) === JSON.stringify(['The Hound of the Baskervilles', 'Philosophiæ Naturalis Principia Mathematica', 'Disquisitiones Arithmeticae', 'A Brief History of Time']), '<code>newestBookList</code> should equal <code>[\"The Hound of the Baskervilles\", \"Philosophiæ Naturalis Principia Mathematica\", \"Disquisitiones Arithmeticae\", \"A Brief History of Time\"]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -446,20 +446,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>watchList</code> variable should not change.'",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.')"
|
||||
"text": "The <code>watchList</code> variable should not change.",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use a <code>for</code> loop.'",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.+?\\)/g), 'Your code should not use a <code>for</code> loop.')"
|
||||
"text": "Your code should not use a <code>for</code> loop.",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.+?\\)/g), 'Your code should not use a <code>for</code> loop.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>map</code> method.'",
|
||||
"testString": "assert(code.match(/\\.map/g), 'Your code should use the <code>map</code> method.')"
|
||||
"text": "Your code should use the <code>map</code> method.",
|
||||
"testString": "assert(code.match(/\\.map/g), 'Your code should use the <code>map</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>rating</code> should equal <code>[{\"title\":\"Inception\",\"rating\":\"8.8\"},{\"title\":\"Interstellar\",\"rating\":\"8.6\"},{\"title\":\"The Dark Knight\",\"rating\":\"9.0\"},{\"title\":\"Batman Begins\",\"rating\":\"8.3\"},{\"title\":\"Avatar\",\"rating\":\"7.9\"}]</code>.'",
|
||||
"testString": "assert(JSON.stringify(rating) === JSON.stringify([{\"title\":\"Inception\", '<code>rating</code> should equal <code>[{\"title\":\"Inception\",\"rating\":\"8.8\"},{\"title\":\"Interstellar\",\"rating\":\"8.6\"},{\"title\":\"The Dark Knight\",\"rating\":\"9.0\"},{\"title\":\"Batman Begins\",\"rating\":\"8.3\"},{\"title\":\"Avatar\",\"rating\":\"7.9\"}]</code>.')"
|
||||
"text": "<code>rating</code> should equal <code>[{\"title\":\"Inception\",\"rating\":\"8.8\"},{\"title\":\"Interstellar\",\"rating\":\"8.6\"},{\"title\":\"The Dark Knight\",\"rating\":\"9.0\"},{\"title\":\"Batman Begins\",\"rating\":\"8.3\"},{\"title\":\"Avatar\",\"rating\":\"7.9\"}]</code>.",
|
||||
"testString": "assert(JSON.stringify(rating) === JSON.stringify([{\"title\":\"Inception\",\"rating\":\"8.8\"},{\"title\":\"Interstellar\",\"rating\":\"8.6\"},{\"title\":\"The Dark Knight\",\"rating\":\"9.0\"},{\"title\":\"Batman Begins\",\"rating\":\"8.3\"},{\"title\":\"Avatar\",\"rating\":\"7.9\"}]), '<code>rating</code> should equal <code>[{\"title\":\"Inception\",\"rating\":\"8.8\"},{\"title\":\"Interstellar\",\"rating\":\"8.6\"},{\"title\":\"The Dark Knight\",\"rating\":\"9.0\"},{\"title\":\"Batman Begins\",\"rating\":\"8.3\"},{\"title\":\"Avatar\",\"rating\":\"7.9\"}]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -616,12 +616,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>new_s</code> should equal <code>[46, 130, 196, 10]</code>.'",
|
||||
"testString": "assert(JSON.stringify(new_s) === JSON.stringify([46, '<code>new_s</code> should equal <code>[46, 130, 196, 10]</code>.')"
|
||||
"text": "<code>new_s</code> should equal <code>[46, 130, 196, 10]</code>.",
|
||||
"testString": "assert(JSON.stringify(new_s) === JSON.stringify([46, 130, 196, 10]), '<code>new_s</code> should equal <code>[46, 130, 196, 10]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>map</code> method.'",
|
||||
"testString": "assert(!code.match(/\\.map/g), 'Your code should not use the <code>map</code> method.')"
|
||||
"text": "Your code should not use the <code>map</code> method.",
|
||||
"testString": "assert(!code.match(/\\.map/g), 'Your code should not use the <code>map</code> method.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -667,20 +667,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>watchList</code> variable should not change.'",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.')"
|
||||
"text": "The <code>watchList</code> variable should not change.",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>filter</code> method.'",
|
||||
"testString": "assert(code.match(/\\.filter/g), 'Your code should use the <code>filter</code> method.')"
|
||||
"text": "Your code should use the <code>filter</code> method.",
|
||||
"testString": "assert(code.match(/\\.filter/g), 'Your code should use the <code>filter</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use a <code>for</code> loop.'",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.+?\\)/g), 'Your code should not use a <code>for</code> loop.')"
|
||||
"text": "Your code should not use a <code>for</code> loop.",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.+?\\)/g), 'Your code should not use a <code>for</code> loop.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>filteredList</code> should equal <code>[{\"title\": \"Inception\",\"rating\": \"8.8\"},{\"title\": \"Interstellar\",\"rating\": \"8.6\"},{\"title\": \"The Dark Knight\",\"rating\": \"9.0\"},{\"title\": \"Batman Begins\",\"rating\": \"8.3\"}]</code>.'",
|
||||
"testString": "assert.deepEqual(filteredList, '<code>filteredList</code> should equal <code>[{\"title\": \"Inception\",\"rating\": \"8.8\"},{\"title\": \"Interstellar\",\"rating\": \"8.6\"},{\"title\": \"The Dark Knight\",\"rating\": \"9.0\"},{\"title\": \"Batman Begins\",\"rating\": \"8.3\"}]</code>.')"
|
||||
"text": "<code>filteredList</code> should equal <code>[{\"title\": \"Inception\",\"rating\": \"8.8\"},{\"title\": \"Interstellar\",\"rating\": \"8.6\"},{\"title\": \"The Dark Knight\",\"rating\": \"9.0\"},{\"title\": \"Batman Begins\",\"rating\": \"8.3\"}]</code>.",
|
||||
"testString": "assert.deepEqual(filteredList, [{\"title\": \"Inception\",\"rating\": \"8.8\"},{\"title\": \"Interstellar\",\"rating\": \"8.6\"},{\"title\": \"The Dark Knight\",\"rating\": \"9.0\"},{\"title\": \"Batman Begins\",\"rating\": \"8.3\"}], '<code>filteredList</code> should equal <code>[{\"title\": \"Inception\",\"rating\": \"8.8\"},{\"title\": \"Interstellar\",\"rating\": \"8.6\"},{\"title\": \"The Dark Knight\",\"rating\": \"9.0\"},{\"title\": \"Batman Begins\",\"rating\": \"8.3\"}]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -832,12 +832,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>new_s</code> should equal <code>[23, 65, 5]</code>.'",
|
||||
"testString": "assert(JSON.stringify(new_s) === JSON.stringify([23, '<code>new_s</code> should equal <code>[23, 65, 5]</code>.')"
|
||||
"text": "<code>new_s</code> should equal <code>[23, 65, 5]</code>.",
|
||||
"testString": "assert(JSON.stringify(new_s) === JSON.stringify([23, 65, 5]), '<code>new_s</code> should equal <code>[23, 65, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>filter</code> method.'",
|
||||
"testString": "assert(!code.match(/\\.filter/g), 'Your code should not use the <code>filter</code> method.')"
|
||||
"text": "Your code should not use the <code>filter</code> method.",
|
||||
"testString": "assert(!code.match(/\\.filter/g), 'Your code should not use the <code>filter</code> method.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -884,24 +884,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>slice</code> method.'",
|
||||
"testString": "assert(code.match(/\\.slice/g), 'Your code should use the <code>slice</code> method.')"
|
||||
"text": "Your code should use the <code>slice</code> method.",
|
||||
"testString": "assert(code.match(/\\.slice/g), 'Your code should use the <code>slice</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>inputAnim</code> variable should not change.'",
|
||||
"testString": "assert(JSON.stringify(inputAnim) === JSON.stringify([\"Cat\", 'The <code>inputAnim</code> variable should not change.')"
|
||||
"text": "The <code>inputAnim</code> variable should not change.",
|
||||
"testString": "assert(JSON.stringify(inputAnim) === JSON.stringify([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"]), 'The <code>inputAnim</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 3)</code> should return <code>[\"Dog\", \"Tiger\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 3)</code> should return <code>[\"Dog\", \"Tiger\"]</code>.')"
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 3)</code> should return <code>[\"Dog\", \"Tiger\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 3)) === JSON.stringify([\"Dog\", \"Tiger\"]), '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 3)</code> should return <code>[\"Dog\", \"Tiger\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 0, 1)</code> should return <code>[\"Cat\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 0, 1)</code> should return <code>[\"Cat\"]</code>.')"
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 0, 1)</code> should return <code>[\"Cat\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 0, 1)) === JSON.stringify([\"Cat\"]), '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 0, 1)</code> should return <code>[\"Cat\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 4)</code> should return <code>[\"Dog\", \"Tiger\", \"Zebra\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 4)</code> should return <code>[\"Dog\", \"Tiger\", \"Zebra\"]</code>.')"
|
||||
"text": "<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 4)</code> should return <code>[\"Dog\", \"Tiger\", \"Zebra\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 4)) === JSON.stringify([\"Dog\", \"Tiger\", \"Zebra\"]), '<code>sliceArray([\"Cat\", \"Dog\", \"Tiger\", \"Zebra\", \"Ant\"], 1, 4)</code> should return <code>[\"Dog\", \"Tiger\", \"Zebra\"]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -942,20 +942,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>slice</code> method.'",
|
||||
"testString": "assert(code.match(/\\.slice/g), 'Your code should use the <code>slice</code> method.')"
|
||||
"text": "Your code should use the <code>slice</code> method.",
|
||||
"testString": "assert(code.match(/\\.slice/g), 'Your code should use the <code>slice</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>splice</code> method.'",
|
||||
"testString": "assert(!code.match(/\\.splice/g), 'Your code should not use the <code>splice</code> method.')"
|
||||
"text": "Your code should not use the <code>splice</code> method.",
|
||||
"testString": "assert(!code.match(/\\.splice/g), 'Your code should not use the <code>splice</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>inputCities</code> array should not change.'",
|
||||
"testString": "assert(JSON.stringify(inputCities) === JSON.stringify([\"Chicago\", 'The <code>inputCities</code> array should not change.')"
|
||||
"text": "The <code>inputCities</code> array should not change.",
|
||||
"testString": "assert(JSON.stringify(inputCities) === JSON.stringify([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"]), 'The <code>inputCities</code> array should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>nonMutatingSplice([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"])</code> should return <code>[\"Chicago\", \"Delhi\", \"Islamabad\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(nonMutatingSplice([\"Chicago\", '<code>nonMutatingSplice([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"])</code> should return <code>[\"Chicago\", \"Delhi\", \"Islamabad\"]</code>.')"
|
||||
"text": "<code>nonMutatingSplice([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"])</code> should return <code>[\"Chicago\", \"Delhi\", \"Islamabad\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(nonMutatingSplice([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"])) === JSON.stringify([\"Chicago\", \"Delhi\", \"Islamabad\"]), '<code>nonMutatingSplice([\"Chicago\", \"Delhi\", \"Islamabad\", \"London\", \"Berlin\"])</code> should return <code>[\"Chicago\", \"Delhi\", \"Islamabad\"]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -994,20 +994,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>concat</code> method.'",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.')"
|
||||
"text": "Your code should use the <code>concat</code> method.",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>first</code> array should not change.'",
|
||||
"testString": "assert(JSON.stringify(first) === JSON.stringify([1, 'The <code>first</code> array should not change.')"
|
||||
"text": "The <code>first</code> array should not change.",
|
||||
"testString": "assert(JSON.stringify(first) === JSON.stringify([1, 2, 3]), 'The <code>first</code> array should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>second</code> array should not change.'",
|
||||
"testString": "assert(JSON.stringify(second) === JSON.stringify([4, 'The <code>second</code> array should not change.')"
|
||||
"text": "The <code>second</code> array should not change.",
|
||||
"testString": "assert(JSON.stringify(second) === JSON.stringify([4, 5]), 'The <code>second</code> array should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>nonMutatingConcat([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.'",
|
||||
"testString": "assert(JSON.stringify(nonMutatingConcat([1, '<code>nonMutatingConcat([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.')"
|
||||
"text": "<code>nonMutatingConcat([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.",
|
||||
"testString": "assert(JSON.stringify(nonMutatingConcat([1, 2, 3], [4, 5])) === JSON.stringify([1, 2, 3, 4, 5]), '<code>nonMutatingConcat([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1049,24 +1049,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>concat</code> method.'",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.')"
|
||||
"text": "Your code should use the <code>concat</code> method.",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>push</code> method.'",
|
||||
"testString": "assert(!code.match(/\\.push/g), 'Your code should not use the <code>push</code> method.')"
|
||||
"text": "Your code should not use the <code>push</code> method.",
|
||||
"testString": "assert(!code.match(/\\.push/g), 'Your code should not use the <code>push</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>first</code> array should not change.'",
|
||||
"testString": "assert(JSON.stringify(first) === JSON.stringify([1, 'The <code>first</code> array should not change.')"
|
||||
"text": "The <code>first</code> array should not change.",
|
||||
"testString": "assert(JSON.stringify(first) === JSON.stringify([1, 2, 3]), 'The <code>first</code> array should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>second</code> array should not change.'",
|
||||
"testString": "assert(JSON.stringify(second) === JSON.stringify([4, 'The <code>second</code> array should not change.')"
|
||||
"text": "The <code>second</code> array should not change.",
|
||||
"testString": "assert(JSON.stringify(second) === JSON.stringify([4, 5]), 'The <code>second</code> array should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>nonMutatingPush([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.'",
|
||||
"testString": "assert(JSON.stringify(nonMutatingPush([1, '<code>nonMutatingPush([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.')"
|
||||
"text": "<code>nonMutatingPush([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.",
|
||||
"testString": "assert(JSON.stringify(nonMutatingPush([1, 2, 3], [4, 5])) === JSON.stringify([1, 2, 3, 4, 5]), '<code>nonMutatingPush([1, 2, 3], [4, 5])</code> should return <code>[1, 2, 3, 4, 5]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1108,20 +1108,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>watchList</code> variable should not change.'",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.')"
|
||||
"text": "The <code>watchList</code> variable should not change.",
|
||||
"testString": "assert(watchList[0].Title === \"Inception\" && watchList[4].Director == \"James Cameron\", 'The <code>watchList</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>reduce</code> method.'",
|
||||
"testString": "assert(code.match(/\\.reduce/g), 'Your code should use the <code>reduce</code> method.')"
|
||||
"text": "Your code should use the <code>reduce</code> method.",
|
||||
"testString": "assert(code.match(/\\.reduce/g), 'Your code should use the <code>reduce</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>averageRating</code> should equal 8.675.'",
|
||||
"testString": "assert(averageRating == 8.675, 'The <code>averageRating</code> should equal 8.675.')"
|
||||
"text": "The <code>averageRating</code> should equal 8.675.",
|
||||
"testString": "assert(averageRating == 8.675, 'The <code>averageRating</code> should equal 8.675.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use a <code>for</code> loop.'",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.*\\)/g), 'Your code should not use a <code>for</code> loop.')"
|
||||
"text": "Your code should not use a <code>for</code> loop.",
|
||||
"testString": "assert(!code.match(/for\\s*?\\(.*\\)/g), 'Your code should not use a <code>for</code> loop.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1279,20 +1279,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>sort</code> method.'",
|
||||
"testString": "assert(code.match(/\\.sort/g), 'Your code should use the <code>sort</code> method.')"
|
||||
"text": "Your code should use the <code>sort</code> method.",
|
||||
"testString": "assert(code.match(/\\.sort/g), 'Your code should use the <code>sort</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"])</code> should return <code>[\"a\", \"a\", \"c\", \"d\", \"g\", \"z\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"a\", '<code>alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"])</code> should return <code>[\"a\", \"a\", \"c\", \"d\", \"g\", \"z\"]</code>.')"
|
||||
"text": "<code>alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"])</code> should return <code>[\"a\", \"a\", \"c\", \"d\", \"g\", \"z\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"])) === JSON.stringify([\"a\", \"a\", \"c\", \"d\", \"g\", \"z\"]), '<code>alphabeticalOrder([\"a\", \"d\", \"c\", \"a\", \"z\", \"g\"])</code> should return <code>[\"a\", \"a\", \"c\", \"d\", \"g\", \"z\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>alphabeticalOrder([\"x\", \"h\", \"a\", \"m\", \"n\", \"m\"])</code> should return <code>[\"a\", \"h\", \"m\", \"m\", \"n\", \"x\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"x\", '<code>alphabeticalOrder([\"x\", \"h\", \"a\", \"m\", \"n\", \"m\"])</code> should return <code>[\"a\", \"h\", \"m\", \"m\", \"n\", \"x\"]</code>.')"
|
||||
"text": "<code>alphabeticalOrder([\"x\", \"h\", \"a\", \"m\", \"n\", \"m\"])</code> should return <code>[\"a\", \"h\", \"m\", \"m\", \"n\", \"x\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"x\", \"h\", \"a\", \"m\", \"n\", \"m\"])) === JSON.stringify([\"a\", \"h\", \"m\", \"m\", \"n\", \"x\"]), '<code>alphabeticalOrder([\"x\", \"h\", \"a\", \"m\", \"n\", \"m\"])</code> should return <code>[\"a\", \"h\", \"m\", \"m\", \"n\", \"x\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>alphabeticalOrder([\"a\", \"a\", \"a\", \"a\", \"x\", \"t\"])</code> should return <code>[\"a\", \"a\", \"a\", \"a\", \"t\", \"x\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"a\", '<code>alphabeticalOrder([\"a\", \"a\", \"a\", \"a\", \"x\", \"t\"])</code> should return <code>[\"a\", \"a\", \"a\", \"a\", \"t\", \"x\"]</code>.')"
|
||||
"text": "<code>alphabeticalOrder([\"a\", \"a\", \"a\", \"a\", \"x\", \"t\"])</code> should return <code>[\"a\", \"a\", \"a\", \"a\", \"t\", \"x\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(alphabeticalOrder([\"a\", \"a\", \"a\", \"a\", \"x\", \"t\"])) === JSON.stringify([\"a\", \"a\", \"a\", \"a\", \"t\", \"x\"]), '<code>alphabeticalOrder([\"a\", \"a\", \"a\", \"a\", \"x\", \"t\"])</code> should return <code>[\"a\", \"a\", \"a\", \"a\", \"t\", \"x\"]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1329,20 +1329,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>sort</code> method.'",
|
||||
"testString": "assert(code.match(/\\.sort/g), 'Your code should use the <code>sort</code> method.')"
|
||||
"text": "Your code should use the <code>sort</code> method.",
|
||||
"testString": "assert(code.match(/\\.sort/g), 'Your code should use the <code>sort</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>concat</code> method.'",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.')"
|
||||
"text": "Your code should use the <code>concat</code> method.",
|
||||
"testString": "assert(code.match(/\\.concat/g), 'Your code should use the <code>concat</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>globalArray</code> variable should not change.'",
|
||||
"testString": "assert(JSON.stringify(globalArray) === JSON.stringify([5, 'The <code>globalArray</code> variable should not change.')"
|
||||
"text": "The <code>globalArray</code> variable should not change.",
|
||||
"testString": "assert(JSON.stringify(globalArray) === JSON.stringify([5, 6, 3, 2, 9]), 'The <code>globalArray</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>nonMutatingSort(globalArray)</code> should return <code>[2, 3, 5, 6, 9]</code>.'",
|
||||
"testString": "assert(JSON.stringify(nonMutatingSort(globalArray)) === JSON.stringify([2, '<code>nonMutatingSort(globalArray)</code> should return <code>[2, 3, 5, 6, 9]</code>.')"
|
||||
"text": "<code>nonMutatingSort(globalArray)</code> should return <code>[2, 3, 5, 6, 9]</code>.",
|
||||
"testString": "assert(JSON.stringify(nonMutatingSort(globalArray)) === JSON.stringify([2, 3, 5, 6, 9]), '<code>nonMutatingSort(globalArray)</code> should return <code>[2, 3, 5, 6, 9]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1383,20 +1383,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>split</code> method.'",
|
||||
"testString": "assert(code.match(/\\.split/g), 'Your code should use the <code>split</code> method.')"
|
||||
"text": "Your code should use the <code>split</code> method.",
|
||||
"testString": "assert(code.match(/\\.split/g), 'Your code should use the <code>split</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>splitify(\"Hello World,I-am code\")</code> should return <code>[\"Hello\", \"World\", \"I\", \"am\", \"code\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(splitify(\"Hello World, '<code>splitify(\"Hello World,I-am code\")</code> should return <code>[\"Hello\", \"World\", \"I\", \"am\", \"code\"]</code>.')"
|
||||
"text": "<code>splitify(\"Hello World,I-am code\")</code> should return <code>[\"Hello\", \"World\", \"I\", \"am\", \"code\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(splitify(\"Hello World,I-am code\")) === JSON.stringify([\"Hello\", \"World\", \"I\", \"am\", \"code\"]), '<code>splitify(\"Hello World,I-am code\")</code> should return <code>[\"Hello\", \"World\", \"I\", \"am\", \"code\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>splitify(\"Earth-is-our home\")</code> should return <code>[\"Earth\", \"is\", \"our\", \"home\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(splitify(\"Earth-is-our home\")) === JSON.stringify([\"Earth\", '<code>splitify(\"Earth-is-our home\")</code> should return <code>[\"Earth\", \"is\", \"our\", \"home\"]</code>.')"
|
||||
"text": "<code>splitify(\"Earth-is-our home\")</code> should return <code>[\"Earth\", \"is\", \"our\", \"home\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(splitify(\"Earth-is-our home\")) === JSON.stringify([\"Earth\", \"is\", \"our\", \"home\"]), '<code>splitify(\"Earth-is-our home\")</code> should return <code>[\"Earth\", \"is\", \"our\", \"home\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>splitify(\"This.is.a-sentence\")</code> should return <code>[\"This\", \"is\", \"a\", \"sentence\"]</code>.'",
|
||||
"testString": "assert(JSON.stringify(splitify(\"This.is.a-sentence\")) === JSON.stringify([\"This\", '<code>splitify(\"This.is.a-sentence\")</code> should return <code>[\"This\", \"is\", \"a\", \"sentence\"]</code>.')"
|
||||
"text": "<code>splitify(\"This.is.a-sentence\")</code> should return <code>[\"This\", \"is\", \"a\", \"sentence\"]</code>.",
|
||||
"testString": "assert(JSON.stringify(splitify(\"This.is.a-sentence\")) === JSON.stringify([\"This\", \"is\", \"a\", \"sentence\"]), '<code>splitify(\"This.is.a-sentence\")</code> should return <code>[\"This\", \"is\", \"a\", \"sentence\"]</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1437,28 +1437,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>join</code> method.'",
|
||||
"testString": "assert(code.match(/\\.join/g), 'Your code should use the <code>join</code> method.')"
|
||||
"text": "Your code should use the <code>join</code> method.",
|
||||
"testString": "assert(code.match(/\\.join/g), 'Your code should use the <code>join</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>replace</code> method.'",
|
||||
"testString": "assert(!code.match(/\\.replace/g), 'Your code should not use the <code>replace</code> method.')"
|
||||
"text": "Your code should not use the <code>replace</code> method.",
|
||||
"testString": "assert(!code.match(/\\.replace/g), 'Your code should not use the <code>replace</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sentensify(\"May-the-force-be-with-you\")</code> should return a string.'",
|
||||
"testString": "assert(typeof sentensify(\"May-the-force-be-with-you\") === \"string\", '<code>sentensify(\"May-the-force-be-with-you\")</code> should return a string.')"
|
||||
"text": "<code>sentensify(\"May-the-force-be-with-you\")</code> should return a string.",
|
||||
"testString": "assert(typeof sentensify(\"May-the-force-be-with-you\") === \"string\", '<code>sentensify(\"May-the-force-be-with-you\")</code> should return a string.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sentensify(\"May-the-force-be-with-you\")</code> should return <code>\"May the force be with you\"</code>.'",
|
||||
"testString": "assert(sentensify(\"May-the-force-be-with-you\") === \"May the force be with you\", '<code>sentensify(\"May-the-force-be-with-you\")</code> should return <code>\"May the force be with you\"</code>.')"
|
||||
"text": "<code>sentensify(\"May-the-force-be-with-you\")</code> should return <code>\"May the force be with you\"</code>.",
|
||||
"testString": "assert(sentensify(\"May-the-force-be-with-you\") === \"May the force be with you\", '<code>sentensify(\"May-the-force-be-with-you\")</code> should return <code>\"May the force be with you\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sentensify(\"The.force.is.strong.with.this.one\")</code> should return <code>\"The force is strong with this one\"</code>.'",
|
||||
"testString": "assert(sentensify(\"The.force.is.strong.with.this.one\") === \"The force is strong with this one\", '<code>sentensify(\"The.force.is.strong.with.this.one\")</code> should return <code>\"The force is strong with this one\"</code>.')"
|
||||
"text": "<code>sentensify(\"The.force.is.strong.with.this.one\")</code> should return <code>\"The force is strong with this one\"</code>.",
|
||||
"testString": "assert(sentensify(\"The.force.is.strong.with.this.one\") === \"The force is strong with this one\", '<code>sentensify(\"The.force.is.strong.with.this.one\")</code> should return <code>\"The force is strong with this one\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sentensify(\"There,has,been,an,awakening\")</code> should return <code>\"There has been an awakening\"</code>.'",
|
||||
"testString": "assert(sentensify(\"There, '<code>sentensify(\"There,has,been,an,awakening\")</code> should return <code>\"There has been an awakening\"</code>.')"
|
||||
"text": "<code>sentensify(\"There,has,been,an,awakening\")</code> should return <code>\"There has been an awakening\"</code>.",
|
||||
"testString": "assert(sentensify(\"There,has,been,an,awakening\") === \"There has been an awakening\", '<code>sentensify(\"There,has,been,an,awakening\")</code> should return <code>\"There has been an awakening\"</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1503,28 +1503,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>globalTitle</code> variable should not change.'",
|
||||
"testString": "assert(globalTitle === \"Winter Is Coming\", 'The <code>globalTitle</code> variable should not change.')"
|
||||
"text": "The <code>globalTitle</code> variable should not change.",
|
||||
"testString": "assert(globalTitle === \"Winter Is Coming\", 'The <code>globalTitle</code> variable should not change.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should not use the <code>replace</code> method for this challenge.'",
|
||||
"testString": "assert(!code.match(/\\.replace/g), 'Your code should not use the <code>replace</code> method for this challenge.')"
|
||||
"text": "Your code should not use the <code>replace</code> method for this challenge.",
|
||||
"testString": "assert(!code.match(/\\.replace/g), 'Your code should not use the <code>replace</code> method for this challenge.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>urlSlug(\"Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.'",
|
||||
"testString": "assert(urlSlug(\"Winter Is Coming\") === \"winter-is-coming\", '<code>urlSlug(\"Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.')"
|
||||
"text": "<code>urlSlug(\"Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.",
|
||||
"testString": "assert(urlSlug(\"Winter Is Coming\") === \"winter-is-coming\", '<code>urlSlug(\"Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>urlSlug(\" Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.'",
|
||||
"testString": "assert(urlSlug(\" Winter Is Coming\") === \"winter-is-coming\", '<code>urlSlug(\" Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.')"
|
||||
"text": "<code>urlSlug(\" Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.",
|
||||
"testString": "assert(urlSlug(\" Winter Is Coming\") === \"winter-is-coming\", '<code>urlSlug(\" Winter Is Coming\")</code> should return <code>\"winter-is-coming\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\")</code> should return <code>\"a-mind-needs-books-like-a-sword-needs-a-whetstone\"</code>.'",
|
||||
"testString": "assert(urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\") === \"a-mind-needs-books-like-a-sword-needs-a-whetstone\", '<code>urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\")</code> should return <code>\"a-mind-needs-books-like-a-sword-needs-a-whetstone\"</code>.')"
|
||||
"text": "<code>urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\")</code> should return <code>\"a-mind-needs-books-like-a-sword-needs-a-whetstone\"</code>.",
|
||||
"testString": "assert(urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\") === \"a-mind-needs-books-like-a-sword-needs-a-whetstone\", '<code>urlSlug(\"A Mind Needs Books Like A Sword Needs A Whetstone\")</code> should return <code>\"a-mind-needs-books-like-a-sword-needs-a-whetstone\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>urlSlug(\"Hold The Door\")</code> should return <code>\"hold-the-door\"</code>.'",
|
||||
"testString": "assert(urlSlug(\"Hold The Door\") === \"hold-the-door\", '<code>urlSlug(\"Hold The Door\")</code> should return <code>\"hold-the-door\"</code>.')"
|
||||
"text": "<code>urlSlug(\"Hold The Door\")</code> should return <code>\"hold-the-door\"</code>.",
|
||||
"testString": "assert(urlSlug(\"Hold The Door\") === \"hold-the-door\", '<code>urlSlug(\"Hold The Door\")</code> should return <code>\"hold-the-door\"</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1570,20 +1570,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>every</code> method.'",
|
||||
"testString": "assert(code.match(/\\.every/g), 'Your code should use the <code>every</code> method.')"
|
||||
"text": "Your code should use the <code>every</code> method.",
|
||||
"testString": "assert(code.match(/\\.every/g), 'Your code should use the <code>every</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>false</code>.'",
|
||||
"testString": "assert(!checkPositive([1, '<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>false</code>.')"
|
||||
"text": "<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>false</code>.",
|
||||
"testString": "assert(!checkPositive([1, 2, 3, -4, 5]), '<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>false</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.'",
|
||||
"testString": "assert(checkPositive([1, '<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.')"
|
||||
"text": "<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.",
|
||||
"testString": "assert(checkPositive([1, 2, 3, 4, 5]), '<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([1, -2, 3, -4, 5])</code> should return <code>false</code>.'",
|
||||
"testString": "assert(!checkPositive([1, '<code>checkPositive([1, -2, 3, -4, 5])</code> should return <code>false</code>.')"
|
||||
"text": "<code>checkPositive([1, -2, 3, -4, 5])</code> should return <code>false</code>.",
|
||||
"testString": "assert(!checkPositive([1, -2, 3, -4, 5]), '<code>checkPositive([1, -2, 3, -4, 5])</code> should return <code>false</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1622,20 +1622,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should use the <code>some</code> method.'",
|
||||
"testString": "assert(code.match(/\\.some/g), 'Your code should use the <code>some</code> method.')"
|
||||
"text": "Your code should use the <code>some</code> method.",
|
||||
"testString": "assert(code.match(/\\.some/g), 'Your code should use the <code>some</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>true</code>.'",
|
||||
"testString": "assert(checkPositive([1, '<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>true</code>.')"
|
||||
"text": "<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>true</code>.",
|
||||
"testString": "assert(checkPositive([1, 2, 3, -4, 5]), '<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>true</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.'",
|
||||
"testString": "assert(checkPositive([1, '<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.')"
|
||||
"text": "<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.",
|
||||
"testString": "assert(checkPositive([1, 2, 3, 4, 5]), '<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkPositive([-1, -2, -3, -4, -5])</code> should return <code>false</code>.'",
|
||||
"testString": "assert(!checkPositive([-1, '<code>checkPositive([-1, -2, -3, -4, -5])</code> should return <code>false</code>.')"
|
||||
"text": "<code>checkPositive([-1, -2, -3, -4, -5])</code> should return <code>false</code>.",
|
||||
"testString": "assert(!checkPositive([-1, -2, -3, -4, -5]), '<code>checkPositive([-1, -2, -3, -4, -5])</code> should return <code>false</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
@ -1680,20 +1680,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>add(10)(20)(30)</code> should return <code>60</code>.'",
|
||||
"testString": "assert(add(10)(20)(30) === 60, '<code>add(10)(20)(30)</code> should return <code>60</code>.')"
|
||||
"text": "<code>add(10)(20)(30)</code> should return <code>60</code>.",
|
||||
"testString": "assert(add(10)(20)(30) === 60, '<code>add(10)(20)(30)</code> should return <code>60</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>add(1)(2)(3)</code> should return <code>6</code>.'",
|
||||
"testString": "assert(add(1)(2)(3) === 6, '<code>add(1)(2)(3)</code> should return <code>6</code>.')"
|
||||
"text": "<code>add(1)(2)(3)</code> should return <code>6</code>.",
|
||||
"testString": "assert(add(1)(2)(3) === 6, '<code>add(1)(2)(3)</code> should return <code>6</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>add(11)(22)(33)</code> should return <code>66</code>.'",
|
||||
"testString": "assert(add(11)(22)(33) === 66, '<code>add(11)(22)(33)</code> should return <code>66</code>.')"
|
||||
"text": "<code>add(11)(22)(33)</code> should return <code>66</code>.",
|
||||
"testString": "assert(add(11)(22)(33) === 66, '<code>add(11)(22)(33)</code> should return <code>66</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should include a final statement that returns <code>x + y + z</code>.'",
|
||||
"testString": "assert(code.match(/[xyz]\\s*?\\+\\s*?[xyz]\\s*?\\+\\s*?[xyz]/g), 'Your code should include a final statement that returns <code>x + y + z</code>.')"
|
||||
"text": "Your code should include a final statement that returns <code>x + y + z</code>.",
|
||||
"testString": "assert(code.match(/[xyz]\\s*?\\+\\s*?[xyz]\\s*?\\+\\s*?[xyz]/g), 'Your code should include a final statement that returns <code>x + y + z</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [],
|
||||
|
@ -22,24 +22,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>sumAll([1, 4])</code> should return a number.'",
|
||||
"testString": "assert(typeof sumAll([1, '<code>sumAll([1, 4])</code> should return a number.')"
|
||||
"text": "<code>sumAll([1, 4])</code> should return a number.",
|
||||
"testString": "assert(typeof sumAll([1, 4]) === 'number', '<code>sumAll([1, 4])</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumAll([1, 4])</code> should return 10.'",
|
||||
"testString": "assert.deepEqual(sumAll([1, '<code>sumAll([1, 4])</code> should return 10.')"
|
||||
"text": "<code>sumAll([1, 4])</code> should return 10.",
|
||||
"testString": "assert.deepEqual(sumAll([1, 4]), 10, '<code>sumAll([1, 4])</code> should return 10.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumAll([4, 1])</code> should return 10.'",
|
||||
"testString": "assert.deepEqual(sumAll([4, '<code>sumAll([4, 1])</code> should return 10.')"
|
||||
"text": "<code>sumAll([4, 1])</code> should return 10.",
|
||||
"testString": "assert.deepEqual(sumAll([4, 1]), 10, '<code>sumAll([4, 1])</code> should return 10.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumAll([5, 10])</code> should return 45.'",
|
||||
"testString": "assert.deepEqual(sumAll([5, '<code>sumAll([5, 10])</code> should return 45.')"
|
||||
"text": "<code>sumAll([5, 10])</code> should return 45.",
|
||||
"testString": "assert.deepEqual(sumAll([5, 10]), 45, '<code>sumAll([5, 10])</code> should return 45.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumAll([10, 5])</code> should return 45.'",
|
||||
"testString": "assert.deepEqual(sumAll([10, '<code>sumAll([10, 5])</code> should return 45.')"
|
||||
"text": "<code>sumAll([10, 5])</code> should return 45.",
|
||||
"testString": "assert.deepEqual(sumAll([10, 5]), 45, '<code>sumAll([10, 5])</code> should return 45.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -98,64 +98,64 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])</code> should return an array.'",
|
||||
"testString": "assert(typeof diffArray([1, '<code>diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])</code> should return an array.')"
|
||||
"text": "<code>diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])</code> should return an array.",
|
||||
"testString": "assert(typeof diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]) === \"object\", '<code>diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])</code> should return an array.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"pink wool\"]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([\"diorite\", '<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"pink wool\"]</code>.')"
|
||||
"text": "<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"pink wool\"]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]), [\"pink wool\"], '<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"pink wool\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with one item.'",
|
||||
"testString": "assert(diffArray([\"diorite\", '<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with one item.')"
|
||||
"text": "<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with one item.",
|
||||
"testString": "assert(diffArray([\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]).length === 1, '<code>[\"diorite\", \"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with one item.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"diorite\", \"pink wool\"]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([\"andesite\", '<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"diorite\", \"pink wool\"]</code>.')"
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"diorite\", \"pink wool\"]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]), [\"diorite\", \"pink wool\"], '<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[\"diorite\", \"pink wool\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with two items.'",
|
||||
"testString": "assert(diffArray([\"andesite\", '<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with two items.')"
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with two items.",
|
||||
"testString": "assert(diffArray([\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]).length === 2, '<code>[\"andesite\", \"grass\", \"dirt\", \"pink wool\", \"dead shrub\"], [\"diorite\", \"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an array with two items.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([\"andesite\", '<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[]</code>.')"
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]), [], '<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return <code>[]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an empty array.'",
|
||||
"testString": "assert(diffArray([\"andesite\", '<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an empty array.')"
|
||||
"text": "<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an empty array.",
|
||||
"testString": "assert(diffArray([\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]).length === 0, '<code>[\"andesite\", \"grass\", \"dirt\", \"dead shrub\"], [\"andesite\", \"grass\", \"dirt\", \"dead shrub\"]</code> should return an empty array.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return <code>[4]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([1, '<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return <code>[4]</code>.')"
|
||||
"text": "<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return <code>[4]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], '<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return <code>[4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return an array with one item.'",
|
||||
"testString": "assert(diffArray([1, '<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return an array with one item.')"
|
||||
"text": "<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return an array with one item.",
|
||||
"testString": "assert(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]).length === 1, '<code>[1, 2, 3, 5], [1, 2, 3, 4, 5]</code> should return an array with one item.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return <code>[\"piglet\", 4]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([1, '<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return <code>[\"piglet\", 4]</code>.')"
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return <code>[\"piglet\", 4]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]), [\"piglet\", 4], '<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return <code>[\"piglet\", 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return an array with two items.'",
|
||||
"testString": "assert(diffArray([1, '<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return an array with two items.')"
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return an array with two items.",
|
||||
"testString": "assert(diffArray([1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]).length === 2, '<code>[1, \"calf\", 3, \"piglet\"], [1, \"calf\", 3, 4]</code> should return an array with two items.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return <code>[\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([], '<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return <code>[\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code>.')"
|
||||
"text": "<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return <code>[\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]), [\"snuffleupagus\", \"cookie monster\", \"elmo\"], '<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return <code>[\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return an array with three items.'",
|
||||
"testString": "assert(diffArray([], '<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return an array with three items.')"
|
||||
"text": "<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return an array with three items.",
|
||||
"testString": "assert(diffArray([], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]).length === 3, '<code>[], [\"snuffleupagus\", \"cookie monster\", \"elmo\"]</code> should return an array with three items.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return <code>[1, \"calf\", 3, \"piglet\", 7, \"filly\"]</code>.'",
|
||||
"testString": "assert.sameMembers(diffArray([1, '<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return <code>[1, \"calf\", 3, \"piglet\", 7, \"filly\"]</code>.')"
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return <code>[1, \"calf\", 3, \"piglet\", 7, \"filly\"]</code>.",
|
||||
"testString": "assert.sameMembers(diffArray([1, \"calf\", 3, \"piglet\"], [7, \"filly\"]), [1, \"calf\", 3, \"piglet\", 7, \"filly\"], '<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return <code>[1, \"calf\", 3, \"piglet\", 7, \"filly\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return an array with six items.'",
|
||||
"testString": "assert(diffArray([1, '<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return an array with six items.')"
|
||||
"text": "<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return an array with six items.",
|
||||
"testString": "assert(diffArray([1, \"calf\", 3, \"piglet\"], [7, \"filly\"]).length === 6, '<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return an array with six items.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -213,28 +213,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>destroyer([1, 2, 3, 1, 2, 3], 2, 3)</code> should return <code>[1, 1]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([1, '<code>destroyer([1, 2, 3, 1, 2, 3], 2, 3)</code> should return <code>[1, 1]</code>.')"
|
||||
"text": "<code>destroyer([1, 2, 3, 1, 2, 3], 2, 3)</code> should return <code>[1, 1]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1], '<code>destroyer([1, 2, 3, 1, 2, 3], 2, 3)</code> should return <code>[1, 1]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)</code> should return <code>[1, 5, 1]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([1, '<code>destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)</code> should return <code>[1, 5, 1]</code>.')"
|
||||
"text": "<code>destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)</code> should return <code>[1, 5, 1]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1], '<code>destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)</code> should return <code>[1, 5, 1]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>destroyer([3, 5, 1, 2, 2], 2, 3, 5)</code> should return <code>[1]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([3, '<code>destroyer([3, 5, 1, 2, 2], 2, 3, 5)</code> should return <code>[1]</code>.')"
|
||||
"text": "<code>destroyer([3, 5, 1, 2, 2], 2, 3, 5)</code> should return <code>[1]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1], '<code>destroyer([3, 5, 1, 2, 2], 2, 3, 5)</code> should return <code>[1]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>destroyer([2, 3, 2, 3], 2, 3)</code> should return <code>[]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([2, '<code>destroyer([2, 3, 2, 3], 2, 3)</code> should return <code>[]</code>.')"
|
||||
"text": "<code>destroyer([2, 3, 2, 3], 2, 3)</code> should return <code>[]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), [], '<code>destroyer([2, 3, 2, 3], 2, 3)</code> should return <code>[]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53)</code> should return <code>[\"hamburger\"]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([\"tree\", '<code>destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53)</code> should return <code>[\"hamburger\"]</code>.')"
|
||||
"text": "<code>destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53)</code> should return <code>[\"hamburger\"]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53), [\"hamburger\"], '<code>destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53)</code> should return <code>[\"hamburger\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\")</code> should return <code>[12,92,65]</code>.'",
|
||||
"testString": "assert.deepEqual(destroyer([\"possum\", '<code>destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\")</code> should return <code>[12,92,65]</code>.')"
|
||||
"text": "<code>destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\")</code> should return <code>[12,92,65]</code>.",
|
||||
"testString": "assert.deepEqual(destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\"), [12,92,65], '<code>destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\")</code> should return <code>[12,92,65]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -295,28 +295,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" })</code> should return <code>[{ first: \"Tybalt\", last: \"Capulet\" }]</code>.'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ first: \"Romeo\", '<code>whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" })</code> should return <code>[{ first: \"Tybalt\", last: \"Capulet\" }]</code>.')"
|
||||
"text": "<code>whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" })</code> should return <code>[{ first: \"Tybalt\", last: \"Capulet\" }]</code>.",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" }), [{ first: \"Tybalt\", last: \"Capulet\" }], '<code>whatIsInAName([{ first: \"Romeo\", last: \"Montague\" }, { first: \"Mercutio\", last: null }, { first: \"Tybalt\", last: \"Capulet\" }], { last: \"Capulet\" })</code> should return <code>[{ first: \"Tybalt\", last: \"Capulet\" }]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], { \"apple\": 1 })</code> should return <code>[{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }]</code>.'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1 }, '<code>whatIsInAName([{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], { \"apple\": 1 })</code> should return <code>[{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }]</code>.')"
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], { \"apple\": 1 })</code> should return <code>[{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }]</code>.",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], { \"apple\": 1 }), [{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], '<code>whatIsInAName([{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }], { \"apple\": 1 })</code> should return <code>[{ \"apple\": 1 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2 }]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.')"
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"bat\": 2 }), [{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"cookie\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"cookie\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.')"
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"cookie\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"cookie\": 2 }), [{ \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }], { \"apple\": 1, \"cookie\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2, \"cookie\": 2 }]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }, { \"bat\":2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\":2 }]</code>.'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }, { \"bat\":2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\":2 }]</code>.')"
|
||||
"text": "<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }, { \"bat\":2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\":2 }]</code>.",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }, {\"bat\":2}], { \"apple\": 1, \"bat\": 2 }), [{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\":2 }], '<code>whatIsInAName([{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1 }, { \"apple\": 1, \"bat\": 2, \"cookie\": 2 }, { \"bat\":2 }], { \"apple\": 1, \"bat\": 2 })</code> should return <code>[{ \"apple\": 1, \"bat\": 2 }, { \"apple\": 1, \"bat\": 2, \"cookie\":2 }]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>whatIsInAName([{\"a\": 1, \"b\": 2, \"c\": 3}], {\"a\": 1, \"b\": 9999, \"c\": 3})</code> should return <code>[]</code>'",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"a\": 1, '<code>whatIsInAName([{\"a\": 1, \"b\": 2, \"c\": 3}], {\"a\": 1, \"b\": 9999, \"c\": 3})</code> should return <code>[]</code>')"
|
||||
"text": "<code>whatIsInAName([{\"a\": 1, \"b\": 2, \"c\": 3}], {\"a\": 1, \"b\": 9999, \"c\": 3})</code> should return <code>[]</code>",
|
||||
"testString": "assert.deepEqual(whatIsInAName([{ \"a\": 1, \"b\": 2, \"c\": 3 }], { \"a\": 1, \"b\": 9999, \"c\": 3 }), [], '<code>whatIsInAName([{\"a\": 1, \"b\": 2, \"c\": 3}], {\"a\": 1, \"b\": 9999, \"c\": 3})</code> should return <code>[]</code>');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -380,24 +380,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>spinalCase(\"This Is Spinal Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.'",
|
||||
"testString": "assert.deepEqual(spinalCase(\"This Is Spinal Tap\"), '<code>spinalCase(\"This Is Spinal Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.')"
|
||||
"text": "<code>spinalCase(\"This Is Spinal Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.",
|
||||
"testString": "assert.deepEqual(spinalCase(\"This Is Spinal Tap\"), \"this-is-spinal-tap\", '<code>spinalCase(\"This Is Spinal Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>spinalCase(\"thisIsSpinal<wbr>Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.'",
|
||||
"testString": "assert.strictEqual(spinalCase('thisIsSpinalTap'), '<code>spinalCase(\"thisIsSpinal<wbr>Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.')"
|
||||
"text": "<code>spinalCase(\"thisIsSpinal<wbr>Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.",
|
||||
"testString": "assert.strictEqual(spinalCase('thisIsSpinalTap'), \"this-is-spinal-tap\", '<code>spinalCase(\"thisIsSpinal<wbr>Tap\")</code> should return <code>\"this-is-spinal-tap\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>spinalCase(\"The_Andy_<wbr>Griffith_Show\")</code> should return <code>\"the-andy-griffith-show\"</code>.'",
|
||||
"testString": "assert.strictEqual(spinalCase(\"The_Andy_Griffith_Show\"), '<code>spinalCase(\"The_Andy_<wbr>Griffith_Show\")</code> should return <code>\"the-andy-griffith-show\"</code>.')"
|
||||
"text": "<code>spinalCase(\"The_Andy_<wbr>Griffith_Show\")</code> should return <code>\"the-andy-griffith-show\"</code>.",
|
||||
"testString": "assert.strictEqual(spinalCase(\"The_Andy_Griffith_Show\"), \"the-andy-griffith-show\", '<code>spinalCase(\"The_Andy_<wbr>Griffith_Show\")</code> should return <code>\"the-andy-griffith-show\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>spinalCase(\"Teletubbies say Eh-oh\")</code> should return <code>\"teletubbies-say-eh-oh\"</code>.'",
|
||||
"testString": "assert.strictEqual(spinalCase(\"Teletubbies say Eh-oh\"), '<code>spinalCase(\"Teletubbies say Eh-oh\")</code> should return <code>\"teletubbies-say-eh-oh\"</code>.')"
|
||||
"text": "<code>spinalCase(\"Teletubbies say Eh-oh\")</code> should return <code>\"teletubbies-say-eh-oh\"</code>.",
|
||||
"testString": "assert.strictEqual(spinalCase(\"Teletubbies say Eh-oh\"), \"teletubbies-say-eh-oh\", '<code>spinalCase(\"Teletubbies say Eh-oh\")</code> should return <code>\"teletubbies-say-eh-oh\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>spinalCase(\"AllThe-small Things\")</code> should return <code>\"all-the-small-things\"</code>.'",
|
||||
"testString": "assert.strictEqual(spinalCase(\"AllThe-small Things\"), '<code>spinalCase(\"AllThe-small Things\")</code> should return <code>\"all-the-small-things\"</code>.')"
|
||||
"text": "<code>spinalCase(\"AllThe-small Things\")</code> should return <code>\"all-the-small-things\"</code>.",
|
||||
"testString": "assert.strictEqual(spinalCase(\"AllThe-small Things\"), \"all-the-small-things\", '<code>spinalCase(\"AllThe-small Things\")</code> should return <code>\"all-the-small-things\"</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -457,32 +457,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>translatePigLatin(\"california\")</code> should return \"aliforniacay\".'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"california\"), '<code>translatePigLatin(\"california\")</code> should return \"aliforniacay\".')"
|
||||
"text": "<code>translatePigLatin(\"california\")</code> should return \"aliforniacay\".",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"california\"), \"aliforniacay\", '<code>translatePigLatin(\"california\")</code> should return \"aliforniacay\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>translatePigLatin(\"paragraphs\")</code> should return \"aragraphspay\".'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"paragraphs\"), '<code>translatePigLatin(\"paragraphs\")</code> should return \"aragraphspay\".')"
|
||||
"text": "<code>translatePigLatin(\"paragraphs\")</code> should return \"aragraphspay\".",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"paragraphs\"), \"aragraphspay\", '<code>translatePigLatin(\"paragraphs\")</code> should return \"aragraphspay\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>translatePigLatin(\"glove\")</code> should return \"oveglay\".'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"glove\"), '<code>translatePigLatin(\"glove\")</code> should return \"oveglay\".')"
|
||||
"text": "<code>translatePigLatin(\"glove\")</code> should return \"oveglay\".",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"glove\"), \"oveglay\", '<code>translatePigLatin(\"glove\")</code> should return \"oveglay\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>translatePigLatin(\"algorithm\")</code> should return \"algorithmway\".'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"algorithm\"), '<code>translatePigLatin(\"algorithm\")</code> should return \"algorithmway\".')"
|
||||
"text": "<code>translatePigLatin(\"algorithm\")</code> should return \"algorithmway\".",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"algorithm\"), \"algorithmway\", '<code>translatePigLatin(\"algorithm\")</code> should return \"algorithmway\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>translatePigLatin(\"eight\")</code> should return \"eightway\".'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"eight\"), '<code>translatePigLatin(\"eight\")</code> should return \"eightway\".')"
|
||||
"text": "<code>translatePigLatin(\"eight\")</code> should return \"eightway\".",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"eight\"), \"eightway\", '<code>translatePigLatin(\"eight\")</code> should return \"eightway\".');"
|
||||
},
|
||||
{
|
||||
"text": "Should handle words where the first vowel comes in the end of the word.'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"schwartz\"), 'Should handle words where the first vowel comes in the end of the word.')"
|
||||
"text": "Should handle words where the first vowel comes in the end of the word.",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"schwartz\"), \"artzschway\", 'Should handle words where the first vowel comes in the end of the word.');"
|
||||
},
|
||||
{
|
||||
"text": "Should handle words without vowels.'",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"rhythm\"), 'Should handle words without vowels.')"
|
||||
"text": "Should handle words without vowels.",
|
||||
"testString": "assert.deepEqual(translatePigLatin(\"rhythm\"), \"rhythmay\", 'Should handle words without vowels.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -550,24 +550,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>myReplace(\"Let us go to the store\", \"store\", \"mall\")</code> should return \"Let us go to the mall\".'",
|
||||
"testString": "assert.deepEqual(myReplace(\"Let us go to the store\", '<code>myReplace(\"Let us go to the store\", \"store\", \"mall\")</code> should return \"Let us go to the mall\".')"
|
||||
"text": "<code>myReplace(\"Let us go to the store\", \"store\", \"mall\")</code> should return \"Let us go to the mall\".",
|
||||
"testString": "assert.deepEqual(myReplace(\"Let us go to the store\", \"store\", \"mall\"), \"Let us go to the mall\", '<code>myReplace(\"Let us go to the store\", \"store\", \"mall\")</code> should return \"Let us go to the mall\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")</code> should return \"He is Sitting on the couch\".'",
|
||||
"testString": "assert.deepEqual(myReplace(\"He is Sleeping on the couch\", '<code>myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")</code> should return \"He is Sitting on the couch\".')"
|
||||
"text": "<code>myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")</code> should return \"He is Sitting on the couch\".",
|
||||
"testString": "assert.deepEqual(myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\"), \"He is Sitting on the couch\", '<code>myReplace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")</code> should return \"He is Sitting on the couch\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\")</code> should return \"This has a spelling error\".'",
|
||||
"testString": "assert.deepEqual(myReplace(\"This has a spellngi error\", '<code>myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\")</code> should return \"This has a spelling error\".')"
|
||||
"text": "<code>myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\")</code> should return \"This has a spelling error\".",
|
||||
"testString": "assert.deepEqual(myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\"), \"This has a spelling error\", '<code>myReplace(\"This has a spellngi error\", \"spellngi\", \"spelling\")</code> should return \"This has a spelling error\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myReplace(\"His name is Tom\", \"Tom\", \"john\")</code> should return \"His name is John\".'",
|
||||
"testString": "assert.deepEqual(myReplace(\"His name is Tom\", '<code>myReplace(\"His name is Tom\", \"Tom\", \"john\")</code> should return \"His name is John\".')"
|
||||
"text": "<code>myReplace(\"His name is Tom\", \"Tom\", \"john\")</code> should return \"His name is John\".",
|
||||
"testString": "assert.deepEqual(myReplace(\"His name is Tom\", \"Tom\", \"john\"), \"His name is John\", '<code>myReplace(\"His name is Tom\", \"Tom\", \"john\")</code> should return \"His name is John\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\")</code> should return \"Let us get back to more Algorithms\".'",
|
||||
"testString": "assert.deepEqual(myReplace(\"Let us get back to more Coding\", '<code>myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\")</code> should return \"Let us get back to more Algorithms\".')"
|
||||
"text": "<code>myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\")</code> should return \"Let us get back to more Algorithms\".",
|
||||
"testString": "assert.deepEqual(myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\"), \"Let us get back to more Algorithms\", '<code>myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\")</code> should return \"Let us get back to more Algorithms\".');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -635,16 +635,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>pairElement(\"ATCGA\")</code> should return <code>[[\"A\",\"T\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"G\",\"C\"],[\"A\",\"T\"]]</code>.'",
|
||||
"testString": "assert.deepEqual(pairElement(\"ATCGA\"), '<code>pairElement(\"ATCGA\")</code> should return <code>[[\"A\",\"T\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"G\",\"C\"],[\"A\",\"T\"]]</code>.')"
|
||||
"text": "<code>pairElement(\"ATCGA\")</code> should return <code>[[\"A\",\"T\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"G\",\"C\"],[\"A\",\"T\"]]</code>.",
|
||||
"testString": "assert.deepEqual(pairElement(\"ATCGA\"),[[\"A\",\"T\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"G\",\"C\"],[\"A\",\"T\"]], '<code>pairElement(\"ATCGA\")</code> should return <code>[[\"A\",\"T\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"G\",\"C\"],[\"A\",\"T\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairElement(\"TTGAG\")</code> should return <code>[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]]</code>.'",
|
||||
"testString": "assert.deepEqual(pairElement(\"TTGAG\"), '<code>pairElement(\"TTGAG\")</code> should return <code>[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]]</code>.')"
|
||||
"text": "<code>pairElement(\"TTGAG\")</code> should return <code>[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]]</code>.",
|
||||
"testString": "assert.deepEqual(pairElement(\"TTGAG\"),[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]], '<code>pairElement(\"TTGAG\")</code> should return <code>[[\"T\",\"A\"],[\"T\",\"A\"],[\"G\",\"C\"],[\"A\",\"T\"],[\"G\",\"C\"]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>pairElement(\"CTCTA\")</code> should return <code>[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]]</code>.'",
|
||||
"testString": "assert.deepEqual(pairElement(\"CTCTA\"), '<code>pairElement(\"CTCTA\")</code> should return <code>[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]]</code>.')"
|
||||
"text": "<code>pairElement(\"CTCTA\")</code> should return <code>[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]]</code>.",
|
||||
"testString": "assert.deepEqual(pairElement(\"CTCTA\"),[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]], '<code>pairElement(\"CTCTA\")</code> should return <code>[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -708,24 +708,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>fearNotLetter(\"abce\")</code> should return \"d\".'",
|
||||
"testString": "assert.deepEqual(fearNotLetter('abce'), '<code>fearNotLetter(\"abce\")</code> should return \"d\".')"
|
||||
"text": "<code>fearNotLetter(\"abce\")</code> should return \"d\".",
|
||||
"testString": "assert.deepEqual(fearNotLetter('abce'), 'd', '<code>fearNotLetter(\"abce\")</code> should return \"d\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>fearNotLetter(\"abcdefghjklmno\")</code> should return \"i\".'",
|
||||
"testString": "assert.deepEqual(fearNotLetter('abcdefghjklmno'), '<code>fearNotLetter(\"abcdefghjklmno\")</code> should return \"i\".')"
|
||||
"text": "<code>fearNotLetter(\"abcdefghjklmno\")</code> should return \"i\".",
|
||||
"testString": "assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i', '<code>fearNotLetter(\"abcdefghjklmno\")</code> should return \"i\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>fearNotLetter(\"stvwx\")</code> should return \"u\".'",
|
||||
"testString": "assert.deepEqual(fearNotLetter('stvwx'), '<code>fearNotLetter(\"stvwx\")</code> should return \"u\".')"
|
||||
"text": "<code>fearNotLetter(\"stvwx\")</code> should return \"u\".",
|
||||
"testString": "assert.deepEqual(fearNotLetter('stvwx'), 'u', '<code>fearNotLetter(\"stvwx\")</code> should return \"u\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>fearNotLetter(\"bcdf\")</code> should return \"e\".'",
|
||||
"testString": "assert.deepEqual(fearNotLetter('bcdf'), '<code>fearNotLetter(\"bcdf\")</code> should return \"e\".')"
|
||||
"text": "<code>fearNotLetter(\"bcdf\")</code> should return \"e\".",
|
||||
"testString": "assert.deepEqual(fearNotLetter('bcdf'), 'e', '<code>fearNotLetter(\"bcdf\")</code> should return \"e\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>fearNotLetter(\"abcdefghijklmnopqrstuvwxyz\")</code> should return undefined.'",
|
||||
"testString": "assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'), '<code>fearNotLetter(\"abcdefghijklmnopqrstuvwxyz\")</code> should return undefined.')"
|
||||
"text": "<code>fearNotLetter(\"abcdefghijklmnopqrstuvwxyz\")</code> should return undefined.",
|
||||
"testString": "assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'), '<code>fearNotLetter(\"abcdefghijklmnopqrstuvwxyz\")</code> should return undefined.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -785,20 +785,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])</code> should return <code>[1, 3, 2, 5, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, '<code>uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])</code> should return <code>[1, 3, 2, 5, 4]</code>.')"
|
||||
"text": "<code>uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])</code> should return <code>[1, 3, 2, 5, 4]</code>.",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], '<code>uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])</code> should return <code>[1, 3, 2, 5, 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>uniteUnique([1, 3, 2], [1, [5]], [2, [4]])</code> should return <code>[1, 3, 2, [5], [4]]</code>.'",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, '<code>uniteUnique([1, 3, 2], [1, [5]], [2, [4]])</code> should return <code>[1, 3, 2, [5], [4]]</code>.')"
|
||||
"text": "<code>uniteUnique([1, 3, 2], [1, [5]], [2, [4]])</code> should return <code>[1, 3, 2, [5], [4]]</code>.",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], '<code>uniteUnique([1, 3, 2], [1, [5]], [2, [4]])</code> should return <code>[1, 3, 2, [5], [4]]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>uniteUnique([1, 2, 3], [5, 2, 1])</code> should return <code>[1, 2, 3, 5]</code>.'",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, '<code>uniteUnique([1, 2, 3], [5, 2, 1])</code> should return <code>[1, 2, 3, 5]</code>.')"
|
||||
"text": "<code>uniteUnique([1, 2, 3], [5, 2, 1])</code> should return <code>[1, 2, 3, 5]</code>.",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], '<code>uniteUnique([1, 2, 3], [5, 2, 1])</code> should return <code>[1, 2, 3, 5]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])</code> should return <code>[1, 2, 3, 5, 4, 6, 7, 8]</code>.'",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, '<code>uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])</code> should return <code>[1, 2, 3, 5, 4, 6, 7, 8]</code>.')"
|
||||
"text": "<code>uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])</code> should return <code>[1, 2, 3, 5, 4, 6, 7, 8]</code>.",
|
||||
"testString": "assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [1, 2, 3, 5, 4, 6, 7, 8], '<code>uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])</code> should return <code>[1, 2, 3, 5, 4, 6, 7, 8]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -859,32 +859,32 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>convertHTML(\"Dolce & Gabbana\")</code> should return <code>Dolce &​amp; Gabbana</code>.'",
|
||||
"testString": "assert.match(convertHTML(\"Dolce & Gabbana\"), '<code>convertHTML(\"Dolce & Gabbana\")</code> should return <code>Dolce &​amp; Gabbana</code>.')"
|
||||
"text": "<code>convertHTML(\"Dolce & Gabbana\")</code> should return <code>Dolce &​amp; Gabbana</code>.",
|
||||
"testString": "assert.match(convertHTML(\"Dolce & Gabbana\"), /Dolce & Gabbana/, '<code>convertHTML(\"Dolce & Gabbana\")</code> should return <code>Dolce &​amp; Gabbana</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML(\"Hamburgers < Pizza < Tacos\")</code> should return <code>Hamburgers &​lt; Pizza &​lt; Tacos</code>.'",
|
||||
"testString": "assert.match(convertHTML(\"Hamburgers < Pizza < Tacos\"), '<code>convertHTML(\"Hamburgers < Pizza < Tacos\")</code> should return <code>Hamburgers &​lt; Pizza &​lt; Tacos</code>.')"
|
||||
"text": "<code>convertHTML(\"Hamburgers < Pizza < Tacos\")</code> should return <code>Hamburgers &​lt; Pizza &​lt; Tacos</code>.",
|
||||
"testString": "assert.match(convertHTML(\"Hamburgers < Pizza < Tacos\"), /Hamburgers < Pizza < Tacos/, '<code>convertHTML(\"Hamburgers < Pizza < Tacos\")</code> should return <code>Hamburgers &​lt; Pizza &​lt; Tacos</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML(\"Sixty > twelve\")</code> should return <code>Sixty &​gt; twelve</code>.'",
|
||||
"testString": "assert.match(convertHTML(\"Sixty > twelve\"), '<code>convertHTML(\"Sixty > twelve\")</code> should return <code>Sixty &​gt; twelve</code>.')"
|
||||
"text": "<code>convertHTML(\"Sixty > twelve\")</code> should return <code>Sixty &​gt; twelve</code>.",
|
||||
"testString": "assert.match(convertHTML(\"Sixty > twelve\"), /Sixty > twelve/, '<code>convertHTML(\"Sixty > twelve\")</code> should return <code>Sixty &​gt; twelve</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML('Stuff in \"quotation marks\"')</code> should return <code>Stuff in &​quot;quotation marks&​quot;</code>.'",
|
||||
"testString": "assert.match(convertHTML('Stuff in \"quotation marks\"'), '<code>convertHTML('Stuff in \"quotation marks\"')</code> should return <code>Stuff in &​quot;quotation marks&​quot;</code>.')"
|
||||
"text": "<code>convertHTML('Stuff in \"quotation marks\"')</code> should return <code>Stuff in &​quot;quotation marks&​quot;</code>.",
|
||||
"testString": "assert.match(convertHTML('Stuff in \"quotation marks\"'), /Stuff in "quotation marks"/, '<code>convertHTML('Stuff in \"quotation marks\"')</code> should return <code>Stuff in &​quot;quotation marks&​quot;</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML(\"Schindler's List\")</code> should return <code>Schindler&​apos;s List</code>.'",
|
||||
"testString": "assert.match(convertHTML(\"Schindler's List\"), '<code>convertHTML(\"Schindler's List\")</code> should return <code>Schindler&​apos;s List</code>.')"
|
||||
"text": "<code>convertHTML(\"Schindler's List\")</code> should return <code>Schindler&​apos;s List</code>.",
|
||||
"testString": "assert.match(convertHTML(\"Schindler's List\"), /Schindler's List/, '<code>convertHTML(\"Schindler's List\")</code> should return <code>Schindler&​apos;s List</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML(\"<>\")</code> should return <code>&​lt;&​gt;</code>.'",
|
||||
"testString": "assert.match(convertHTML('<>'), '<code>convertHTML(\"<>\")</code> should return <code>&​lt;&​gt;</code>.')"
|
||||
"text": "<code>convertHTML(\"<>\")</code> should return <code>&​lt;&​gt;</code>.",
|
||||
"testString": "assert.match(convertHTML('<>'), /<>/, '<code>convertHTML(\"<>\")</code> should return <code>&​lt;&​gt;</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertHTML(\"abc\")</code> should return <code>abc</code>.'",
|
||||
"testString": "assert.strictEqual(convertHTML('abc'), '<code>convertHTML(\"abc\")</code> should return <code>abc</code>.')"
|
||||
"text": "<code>convertHTML(\"abc\")</code> should return <code>abc</code>.",
|
||||
"testString": "assert.strictEqual(convertHTML('abc'), 'abc', '<code>convertHTML(\"abc\")</code> should return <code>abc</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -943,28 +943,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>sumFibs(1)</code> should return a number.'",
|
||||
"testString": "assert(typeof sumFibs(1) === \"number\", '<code>sumFibs(1)</code> should return a number.')"
|
||||
"text": "<code>sumFibs(1)</code> should return a number.",
|
||||
"testString": "assert(typeof sumFibs(1) === \"number\", '<code>sumFibs(1)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumFibs(1000)</code> should return 1785.'",
|
||||
"testString": "assert(sumFibs(1000) === 1785, '<code>sumFibs(1000)</code> should return 1785.')"
|
||||
"text": "<code>sumFibs(1000)</code> should return 1785.",
|
||||
"testString": "assert(sumFibs(1000) === 1785, '<code>sumFibs(1000)</code> should return 1785.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumFibs(4000000)</code> should return 4613732.'",
|
||||
"testString": "assert(sumFibs(4000000) === 4613732, '<code>sumFibs(4000000)</code> should return 4613732.')"
|
||||
"text": "<code>sumFibs(4000000)</code> should return 4613732.",
|
||||
"testString": "assert(sumFibs(4000000) === 4613732, '<code>sumFibs(4000000)</code> should return 4613732.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumFibs(4)</code> should return 5.'",
|
||||
"testString": "assert(sumFibs(4) === 5, '<code>sumFibs(4)</code> should return 5.')"
|
||||
"text": "<code>sumFibs(4)</code> should return 5.",
|
||||
"testString": "assert(sumFibs(4) === 5, '<code>sumFibs(4)</code> should return 5.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumFibs(75024)</code> should return 60696.'",
|
||||
"testString": "assert(sumFibs(75024) === 60696, '<code>sumFibs(75024)</code> should return 60696.')"
|
||||
"text": "<code>sumFibs(75024)</code> should return 60696.",
|
||||
"testString": "assert(sumFibs(75024) === 60696, '<code>sumFibs(75024)</code> should return 60696.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumFibs(75025)</code> should return 135721.'",
|
||||
"testString": "assert(sumFibs(75025) === 135721, '<code>sumFibs(75025)</code> should return 135721.')"
|
||||
"text": "<code>sumFibs(75025)</code> should return 135721.",
|
||||
"testString": "assert(sumFibs(75025) === 135721, '<code>sumFibs(75025)</code> should return 135721.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1024,16 +1024,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>sumPrimes(10)</code> should return a number.'",
|
||||
"testString": "assert.deepEqual(typeof sumPrimes(10), '<code>sumPrimes(10)</code> should return a number.')"
|
||||
"text": "<code>sumPrimes(10)</code> should return a number.",
|
||||
"testString": "assert.deepEqual(typeof sumPrimes(10), 'number', '<code>sumPrimes(10)</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumPrimes(10)</code> should return 17.'",
|
||||
"testString": "assert.deepEqual(sumPrimes(10), '<code>sumPrimes(10)</code> should return 17.')"
|
||||
"text": "<code>sumPrimes(10)</code> should return 17.",
|
||||
"testString": "assert.deepEqual(sumPrimes(10), 17, '<code>sumPrimes(10)</code> should return 17.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>sumPrimes(977)</code> should return 73156.'",
|
||||
"testString": "assert.deepEqual(sumPrimes(977), '<code>sumPrimes(977)</code> should return 73156.')"
|
||||
"text": "<code>sumPrimes(977)</code> should return 73156.",
|
||||
"testString": "assert.deepEqual(sumPrimes(977), 73156, '<code>sumPrimes(977)</code> should return 73156.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1094,28 +1094,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>smallestCommons([1, 5])</code> should return a number.'",
|
||||
"testString": "assert.deepEqual(typeof smallestCommons([1, '<code>smallestCommons([1, 5])</code> should return a number.')"
|
||||
"text": "<code>smallestCommons([1, 5])</code> should return a number.",
|
||||
"testString": "assert.deepEqual(typeof smallestCommons([1, 5]), 'number', '<code>smallestCommons([1, 5])</code> should return a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>smallestCommons([1, 5])</code> should return 60.'",
|
||||
"testString": "assert.deepEqual(smallestCommons([1, '<code>smallestCommons([1, 5])</code> should return 60.')"
|
||||
"text": "<code>smallestCommons([1, 5])</code> should return 60.",
|
||||
"testString": "assert.deepEqual(smallestCommons([1, 5]), 60, '<code>smallestCommons([1, 5])</code> should return 60.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>smallestCommons([5, 1])</code> should return 60.'",
|
||||
"testString": "assert.deepEqual(smallestCommons([5, '<code>smallestCommons([5, 1])</code> should return 60.')"
|
||||
"text": "<code>smallestCommons([5, 1])</code> should return 60.",
|
||||
"testString": "assert.deepEqual(smallestCommons([5, 1]), 60, '<code>smallestCommons([5, 1])</code> should return 60.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>smallestCommons([2, 10])</code> should return 2520.'",
|
||||
"testString": "assert.deepEqual(smallestCommons([2, '<code>smallestCommons([2, 10])</code> should return 2520.')"
|
||||
"text": "<code>smallestCommons([2, 10])</code> should return 2520.",
|
||||
"testString": "assert.deepEqual(smallestCommons([2, 10]), 2520, '<code>smallestCommons([2, 10])</code> should return 2520.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>smallestCommons([1, 13])</code> should return 360360.'",
|
||||
"testString": "assert.deepEqual(smallestCommons([1, '<code>smallestCommons([1, 13])</code> should return 360360.')"
|
||||
"text": "<code>smallestCommons([1, 13])</code> should return 360360.",
|
||||
"testString": "assert.deepEqual(smallestCommons([1, 13]), 360360, '<code>smallestCommons([1, 13])</code> should return 360360.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>smallestCommons([23, 18])</code> should return 6056820.'",
|
||||
"testString": "assert.deepEqual(smallestCommons([23, '<code>smallestCommons([23, 18])</code> should return 6056820.')"
|
||||
"text": "<code>smallestCommons([23, 18])</code> should return 6056820.",
|
||||
"testString": "assert.deepEqual(smallestCommons([23, 18]), 6056820, '<code>smallestCommons([23, 18])</code> should return 6056820.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1175,28 +1175,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>dropElements([1, 2, 3, 4], function(n) {return n >= 3;})</code> should return <code>[3, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([1, '<code>dropElements([1, 2, 3, 4], function(n) {return n >= 3;})</code> should return <code>[3, 4]</code>.')"
|
||||
"text": "<code>dropElements([1, 2, 3, 4], function(n) {return n >= 3;})</code> should return <code>[3, 4]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n >= 3;}), [3, 4], '<code>dropElements([1, 2, 3, 4], function(n) {return n >= 3;})</code> should return <code>[3, 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dropElements([0, 1, 0, 1], function(n) {return n === 1;})</code> should return <code>[1, 0, 1]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([0, '<code>dropElements([0, 1, 0, 1], function(n) {return n === 1;})</code> should return <code>[1, 0, 1]</code>.')"
|
||||
"text": "<code>dropElements([0, 1, 0, 1], function(n) {return n === 1;})</code> should return <code>[1, 0, 1]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([0, 1, 0, 1], function(n) {return n === 1;}), [1, 0, 1], '<code>dropElements([0, 1, 0, 1], function(n) {return n === 1;})</code> should return <code>[1, 0, 1]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dropElements([1, 2, 3], function(n) {return n > 0;})</code> should return <code>[1, 2, 3]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([1, '<code>dropElements([1, 2, 3], function(n) {return n > 0;})</code> should return <code>[1, 2, 3]</code>.')"
|
||||
"text": "<code>dropElements([1, 2, 3], function(n) {return n > 0;})</code> should return <code>[1, 2, 3]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([1, 2, 3], function(n) {return n > 0;}), [1, 2, 3], '<code>dropElements([1, 2, 3], function(n) {return n > 0;})</code> should return <code>[1, 2, 3]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dropElements([1, 2, 3, 4], function(n) {return n > 5;})</code> should return <code>[]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([1, '<code>dropElements([1, 2, 3, 4], function(n) {return n > 5;})</code> should return <code>[]</code>.')"
|
||||
"text": "<code>dropElements([1, 2, 3, 4], function(n) {return n > 5;})</code> should return <code>[]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n > 5;}), [], '<code>dropElements([1, 2, 3, 4], function(n) {return n > 5;})</code> should return <code>[]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})</code> should return <code>[7, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([1, '<code>dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})</code> should return <code>[7, 4]</code>.')"
|
||||
"text": "<code>dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})</code> should return <code>[7, 4]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}), [7, 4], '<code>dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})</code> should return <code>[7, 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})</code> should return <code>[3, 9, 2]</code>.'",
|
||||
"testString": "assert.deepEqual(dropElements([1, '<code>dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})</code> should return <code>[3, 9, 2]</code>.')"
|
||||
"text": "<code>dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})</code> should return <code>[3, 9, 2]</code>.",
|
||||
"testString": "assert.deepEqual(dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}), [3, 9, 2], '<code>dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})</code> should return <code>[3, 9, 2]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1255,20 +1255,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>steamrollArray([[[\"a\"]], [[\"b\"]]])</code> should return <code>[\"a\", \"b\"]</code>.'",
|
||||
"testString": "assert.deepEqual(steamrollArray([[[\"a\"]], '<code>steamrollArray([[[\"a\"]], [[\"b\"]]])</code> should return <code>[\"a\", \"b\"]</code>.')"
|
||||
"text": "<code>steamrollArray([[[\"a\"]], [[\"b\"]]])</code> should return <code>[\"a\", \"b\"]</code>.",
|
||||
"testString": "assert.deepEqual(steamrollArray([[[\"a\"]], [[\"b\"]]]), [\"a\", \"b\"], '<code>steamrollArray([[[\"a\"]], [[\"b\"]]])</code> should return <code>[\"a\", \"b\"]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>steamrollArray([1, [2], [3, [[4]]]])</code> should return <code>[1, 2, 3, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, '<code>steamrollArray([1, [2], [3, [[4]]]])</code> should return <code>[1, 2, 3, 4]</code>.')"
|
||||
"text": "<code>steamrollArray([1, [2], [3, [[4]]]])</code> should return <code>[1, 2, 3, 4]</code>.",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, [2], [3, [[4]]]]), [1, 2, 3, 4], '<code>steamrollArray([1, [2], [3, [[4]]]])</code> should return <code>[1, 2, 3, 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>steamrollArray([1, [], [3, [[4]]]])</code> should return <code>[1, 3, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, '<code>steamrollArray([1, [], [3, [[4]]]])</code> should return <code>[1, 3, 4]</code>.')"
|
||||
"text": "<code>steamrollArray([1, [], [3, [[4]]]])</code> should return <code>[1, 3, 4]</code>.",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4], '<code>steamrollArray([1, [], [3, [[4]]]])</code> should return <code>[1, 3, 4]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.'",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, '<code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.')"
|
||||
"text": "<code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.",
|
||||
"testString": "assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4], '<code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1324,12 +1324,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\")</code> should return \"Aren't bonfires fun!?\"'",
|
||||
"testString": "assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), '<code>binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\")</code> should return \"Aren't bonfires fun!?\"')"
|
||||
"text": "<code>binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\")</code> should return \"Aren't bonfires fun!?\"",
|
||||
"testString": "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!?\", '<code>binaryAgent(\"01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111\")</code> should return \"Aren't bonfires fun!?\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\")</code> should return \"I love FreeCodeCamp!\"'",
|
||||
"testString": "assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), '<code>binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\")</code> should return \"I love FreeCodeCamp!\"')"
|
||||
"text": "<code>binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\")</code> should return \"I love FreeCodeCamp!\"",
|
||||
"testString": "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!\", '<code>binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\")</code> should return \"I love FreeCodeCamp!\"');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1389,40 +1389,40 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return true.'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return true.')"
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return true.",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\"), true, '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\", \"sex\": \"male\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return false.'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return false.')"
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return false.",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\"), false, '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\"}, {\"user\": \"Dipsy\"}, {\"user\": \"Laa-Laa\", \"sex\": \"female\"}, {\"user\": \"Po\", \"sex\": \"female\"}], \"sex\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\", \"age\": 0}, {\"user\": \"Dipsy\", \"sex\": \"male\", \"age\": 3}, {\"user\": \"Laa-Laa\", \"sex\": \"female\", \"age\": 5}, {\"user\": \"Po\", \"sex\": \"female\", \"age\": 4}], \"age\")</code> should return false.'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\", \"age\": 0}, {\"user\": \"Dipsy\", \"sex\": \"male\", \"age\": 3}, {\"user\": \"Laa-Laa\", \"sex\": \"female\", \"age\": 5}, {\"user\": \"Po\", \"sex\": \"female\", \"age\": 4}], \"age\")</code> should return false.')"
|
||||
"text": "<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\", \"age\": 0}, {\"user\": \"Dipsy\", \"sex\": \"male\", \"age\": 3}, {\"user\": \"Laa-Laa\", \"sex\": \"female\", \"age\": 5}, {\"user\": \"Po\", \"sex\": \"female\", \"age\": 4}], \"age\")</code> should return false.",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\", \"age\": 2}, {\"user\": \"Dipsy\", \"sex\": \"male\", \"age\": 0}, {\"user\": \"Laa-Laa\", \"sex\": \"female\", \"age\": 5}, {\"user\": \"Po\", \"sex\": \"female\", \"age\": 4}], \"age\"), false, '<code>truthCheck([{\"user\": \"Tinky-Winky\", \"sex\": \"male\", \"age\": 0}, {\"user\": \"Dipsy\", \"sex\": \"male\", \"age\": 3}, {\"user\": \"Laa-Laa\", \"sex\": \"female\", \"age\": 5}, {\"user\": \"Po\", \"sex\": \"female\", \"age\": 4}], \"age\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true}, {\"name\": \"FastFoward\", \"onBoat\": null}], \"onBoat\")</code> should return false'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"name\": \"Pete\", '<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true}, {\"name\": \"FastFoward\", \"onBoat\": null}], \"onBoat\")</code> should return false')"
|
||||
"text": "<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true}, {\"name\": \"FastFoward\", \"onBoat\": null}], \"onBoat\")</code> should return false",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true}, {\"name\": \"FastFoward\", \"onBoat\": null}], \"onBoat\"), false, '<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true}, {\"name\": \"FastFoward\", \"onBoat\": null}], \"onBoat\")</code> should return false');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true, \"alias\": \"Repete\"}, {\"name\": \"FastFoward\", \"onBoat\": true}], \"onBoat\")</code> should return true'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"name\": \"Pete\", '<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true, \"alias\": \"Repete\"}, {\"name\": \"FastFoward\", \"onBoat\": true}], \"onBoat\")</code> should return true')"
|
||||
"text": "<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true, \"alias\": \"Repete\"}, {\"name\": \"FastFoward\", \"onBoat\": true}], \"onBoat\")</code> should return true",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true, \"alias\": \"Repete\"}, {\"name\": \"FastFoward\", \"onBoat\": true}], \"onBoat\"), true, '<code>truthCheck([{\"name\": \"Pete\", \"onBoat\": true}, {\"name\": \"Repeat\", \"onBoat\": true, \"alias\": \"Repete\"}, {\"name\": \"FastFoward\", \"onBoat\": true}], \"onBoat\")</code> should return true');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"single\": \"yes\"}], \"single\")</code> should return true'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"yes\"}], '<code>truthCheck([{\"single\": \"yes\"}], \"single\")</code> should return true')"
|
||||
"text": "<code>truthCheck([{\"single\": \"yes\"}], \"single\")</code> should return true",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"yes\"}], \"single\"), true, '<code>truthCheck([{\"single\": \"yes\"}], \"single\")</code> should return true');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"single\": \"\"}, {\"single\": \"double\"}], \"single\")</code> should return false'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"\"}, '<code>truthCheck([{\"single\": \"\"}, {\"single\": \"double\"}], \"single\")</code> should return false')"
|
||||
"text": "<code>truthCheck([{\"single\": \"\"}, {\"single\": \"double\"}], \"single\")</code> should return false",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"\"}, {\"single\": \"double\"}], \"single\"), false, '<code>truthCheck([{\"single\": \"\"}, {\"single\": \"double\"}], \"single\")</code> should return false');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"single\": \"double\"}, {\"single\": undefined}], \"single\")</code> should return false'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"double\"}, '<code>truthCheck([{\"single\": \"double\"}, {\"single\": undefined}], \"single\")</code> should return false')"
|
||||
"text": "<code>truthCheck([{\"single\": \"double\"}, {\"single\": undefined}], \"single\")</code> should return false",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"double\"}, {\"single\": undefined}], \"single\"), false, '<code>truthCheck([{\"single\": \"double\"}, {\"single\": undefined}], \"single\")</code> should return false');"
|
||||
},
|
||||
{
|
||||
"text": "<code>truthCheck([{\"single\": \"double\"}, {\"single\": NaN}], \"single\")</code> should return false'",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"double\"}, '<code>truthCheck([{\"single\": \"double\"}, {\"single\": NaN}], \"single\")</code> should return false')"
|
||||
"text": "<code>truthCheck([{\"single\": \"double\"}, {\"single\": NaN}], \"single\")</code> should return false",
|
||||
"testString": "assert.strictEqual(truthCheck([{\"single\": \"double\"}, {\"single\": NaN}], \"single\"), false, '<code>truthCheck([{\"single\": \"double\"}, {\"single\": NaN}], \"single\")</code> should return false');"
|
||||
}
|
||||
],
|
||||
"isRequired": true,
|
||||
@ -1485,24 +1485,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>addTogether(2, 3)</code> should return 5.'",
|
||||
"testString": "assert.deepEqual(addTogether(2, '<code>addTogether(2, 3)</code> should return 5.')"
|
||||
"text": "<code>addTogether(2, 3)</code> should return 5.",
|
||||
"testString": "assert.deepEqual(addTogether(2, 3), 5, '<code>addTogether(2, 3)</code> should return 5.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>addTogether(2)(3)</code> should return 5.'",
|
||||
"testString": "assert.deepEqual(addTogether(2)(3), '<code>addTogether(2)(3)</code> should return 5.')"
|
||||
"text": "<code>addTogether(2)(3)</code> should return 5.",
|
||||
"testString": "assert.deepEqual(addTogether(2)(3), 5, '<code>addTogether(2)(3)</code> should return 5.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>addTogether(\"http://bit.ly/IqT6zt\")</code> should return undefined.'",
|
||||
"testString": "assert.isUndefined(addTogether(\"http://bit.ly/IqT6zt\"), '<code>addTogether(\"http://bit.ly/IqT6zt\")</code> should return undefined.')"
|
||||
"text": "<code>addTogether(\"http://bit.ly/IqT6zt\")</code> should return undefined.",
|
||||
"testString": "assert.isUndefined(addTogether(\"http://bit.ly/IqT6zt\"), '<code>addTogether(\"http://bit.ly/IqT6zt\")</code> should return undefined.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>addTogether(2, \"3\")</code> should return undefined.'",
|
||||
"testString": "assert.isUndefined(addTogether(2, '<code>addTogether(2, \"3\")</code> should return undefined.')"
|
||||
"text": "<code>addTogether(2, \"3\")</code> should return undefined.",
|
||||
"testString": "assert.isUndefined(addTogether(2, \"3\"), '<code>addTogether(2, \"3\")</code> should return undefined.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>addTogether(2)([3])</code> should return undefined.'",
|
||||
"testString": "assert.isUndefined(addTogether(2)([3]), '<code>addTogether(2)([3])</code> should return undefined.')"
|
||||
"text": "<code>addTogether(2)([3])</code> should return undefined.",
|
||||
"testString": "assert.isUndefined(addTogether(2)([3]), '<code>addTogether(2)([3])</code> should return undefined.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1572,52 +1572,52 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Object.keys(bob).length</code> should return 6.'",
|
||||
"testString": "assert.deepEqual(Object.keys(bob).length, '<code>Object.keys(bob).length</code> should return 6.')"
|
||||
"text": "<code>Object.keys(bob).length</code> should return 6.",
|
||||
"testString": "assert.deepEqual(Object.keys(bob).length, 6, '<code>Object.keys(bob).length</code> should return 6.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob instanceof Person</code> should return true.'",
|
||||
"testString": "assert.deepEqual(bob instanceof Person, '<code>bob instanceof Person</code> should return true.')"
|
||||
"text": "<code>bob instanceof Person</code> should return true.",
|
||||
"testString": "assert.deepEqual(bob instanceof Person, true, '<code>bob instanceof Person</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.firstName</code> should return undefined.'",
|
||||
"testString": "assert.deepEqual(bob.firstName, '<code>bob.firstName</code> should return undefined.')"
|
||||
"text": "<code>bob.firstName</code> should return undefined.",
|
||||
"testString": "assert.deepEqual(bob.firstName, undefined, '<code>bob.firstName</code> should return undefined.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.lastName</code> should return undefined.'",
|
||||
"testString": "assert.deepEqual(bob.lastName, '<code>bob.lastName</code> should return undefined.')"
|
||||
"text": "<code>bob.lastName</code> should return undefined.",
|
||||
"testString": "assert.deepEqual(bob.lastName, undefined, '<code>bob.lastName</code> should return undefined.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFirstName()</code> should return \"Bob\".'",
|
||||
"testString": "assert.deepEqual(bob.getFirstName(), '<code>bob.getFirstName()</code> should return \"Bob\".')"
|
||||
"text": "<code>bob.getFirstName()</code> should return \"Bob\".",
|
||||
"testString": "assert.deepEqual(bob.getFirstName(), 'Bob', '<code>bob.getFirstName()</code> should return \"Bob\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getLastName()</code> should return \"Ross\".'",
|
||||
"testString": "assert.deepEqual(bob.getLastName(), '<code>bob.getLastName()</code> should return \"Ross\".')"
|
||||
"text": "<code>bob.getLastName()</code> should return \"Ross\".",
|
||||
"testString": "assert.deepEqual(bob.getLastName(), 'Ross', '<code>bob.getLastName()</code> should return \"Ross\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFullName()</code> should return \"Bob Ross\".'",
|
||||
"testString": "assert.deepEqual(bob.getFullName(), '<code>bob.getFullName()</code> should return \"Bob Ross\".')"
|
||||
"text": "<code>bob.getFullName()</code> should return \"Bob Ross\".",
|
||||
"testString": "assert.deepEqual(bob.getFullName(), 'Bob Ross', '<code>bob.getFullName()</code> should return \"Bob Ross\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Ross\" after <code>bob.setFirstName(\"Haskell\")</code>.'",
|
||||
"testString": "assert.strictEqual((function () { bob.setFirstName(\"Haskell\"); return bob.getFullName(); })(), '<code>bob.getFullName()</code> should return \"Haskell Ross\" after <code>bob.setFirstName(\"Haskell\")</code>.')"
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Ross\" after <code>bob.setFirstName(\"Haskell\")</code>.",
|
||||
"testString": "assert.strictEqual((function () { bob.setFirstName(\"Haskell\"); return bob.getFullName(); })(), 'Haskell Ross', '<code>bob.getFullName()</code> should return \"Haskell Ross\" after <code>bob.setFirstName(\"Haskell\")</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setLastName(\"Curry\")</code>.'",
|
||||
"testString": "assert.strictEqual((function () { var _bob=new Person('Haskell Ross'); _bob.setLastName(\"Curry\"); return _bob.getFullName(); })(), '<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setLastName(\"Curry\")</code>.')"
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setLastName(\"Curry\")</code>.",
|
||||
"testString": "assert.strictEqual((function () { var _bob=new Person('Haskell Ross'); _bob.setLastName(\"Curry\"); return _bob.getFullName(); })(), 'Haskell Curry', '<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setLastName(\"Curry\")</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.'",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getFullName(); })(), '<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.')"
|
||||
"text": "<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getFullName(); })(), 'Haskell Curry', '<code>bob.getFullName()</code> should return \"Haskell Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getFirstName()</code> should return \"Haskell\" after <code>bob.setFullName(\"Haskell Curry\")</code>.'",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getFirstName(); })(), '<code>bob.getFirstName()</code> should return \"Haskell\" after <code>bob.setFullName(\"Haskell Curry\")</code>.')"
|
||||
"text": "<code>bob.getFirstName()</code> should return \"Haskell\" after <code>bob.setFullName(\"Haskell Curry\")</code>.",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getFirstName(); })(), 'Haskell', '<code>bob.getFirstName()</code> should return \"Haskell\" after <code>bob.setFullName(\"Haskell Curry\")</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>bob.getLastName()</code> should return \"Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.'",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getLastName(); })(), '<code>bob.getLastName()</code> should return \"Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.')"
|
||||
"text": "<code>bob.getLastName()</code> should return \"Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.",
|
||||
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getLastName(); })(), 'Curry', '<code>bob.getLastName()</code> should return \"Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -1699,12 +1699,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])</code> should return <code>[{name: \"sputnik\", orbitalPeriod: 86400}]</code>.'",
|
||||
"testString": "assert.deepEqual(orbitalPeriod([{name : \"sputnik\", '<code>orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])</code> should return <code>[{name: \"sputnik\", orbitalPeriod: 86400}]</code>.')"
|
||||
"text": "<code>orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])</code> should return <code>[{name: \"sputnik\", orbitalPeriod: 86400}]</code>.",
|
||||
"testString": "assert.deepEqual(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]), [{name: \"sputnik\", orbitalPeriod: 86400}], '<code>orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])</code> should return <code>[{name: \"sputnik\", orbitalPeriod: 86400}]</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])</code> should return <code>[{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]</code>.'",
|
||||
"testString": "assert.deepEqual(orbitalPeriod([{name: \"iss\", '<code>orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])</code> should return <code>[{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]</code>.')"
|
||||
"text": "<code>orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])</code> should return <code>[{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]</code>.",
|
||||
"testString": "assert.deepEqual(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}]), [{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}], '<code>orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])</code> should return <code>[{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
|
@ -17,56 +17,56 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>palindrome(\"eye\")</code> should return a boolean.'",
|
||||
"testString": "assert(typeof palindrome(\"eye\") === \"boolean\", '<code>palindrome(\"eye\")</code> should return a boolean.')"
|
||||
"text": "<code>palindrome(\"eye\")</code> should return a boolean.",
|
||||
"testString": "assert(typeof palindrome(\"eye\") === \"boolean\", '<code>palindrome(\"eye\")</code> should return a boolean.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"eye\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"eye\") === true, '<code>palindrome(\"eye\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"eye\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"eye\") === true, '<code>palindrome(\"eye\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"_eye\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"_eye\") === true, '<code>palindrome(\"_eye\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"_eye\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"_eye\") === true, '<code>palindrome(\"_eye\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"race car\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"race car\") === true, '<code>palindrome(\"race car\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"race car\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"race car\") === true, '<code>palindrome(\"race car\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"not a palindrome\")</code> should return false.'",
|
||||
"testString": "assert(palindrome(\"not a palindrome\") === false, '<code>palindrome(\"not a palindrome\")</code> should return false.')"
|
||||
"text": "<code>palindrome(\"not a palindrome\")</code> should return false.",
|
||||
"testString": "assert(palindrome(\"not a palindrome\") === false, '<code>palindrome(\"not a palindrome\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"A man, a plan, a canal. Panama\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"A man, a plan, a canal. Panama\") === true, '<code>palindrome(\"A man, a plan, a canal. Panama\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"A man, a plan, a canal. Panama\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"A man, a plan, a canal. Panama\") === true, '<code>palindrome(\"A man, a plan, a canal. Panama\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"never odd or even\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"never odd or even\") === true, '<code>palindrome(\"never odd or even\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"never odd or even\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"never odd or even\") === true, '<code>palindrome(\"never odd or even\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"nope\")</code> should return false.'",
|
||||
"testString": "assert(palindrome(\"nope\") === false, '<code>palindrome(\"nope\")</code> should return false.')"
|
||||
"text": "<code>palindrome(\"nope\")</code> should return false.",
|
||||
"testString": "assert(palindrome(\"nope\") === false, '<code>palindrome(\"nope\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"almostomla\")</code> should return false.'",
|
||||
"testString": "assert(palindrome(\"almostomla\") === false, '<code>palindrome(\"almostomla\")</code> should return false.')"
|
||||
"text": "<code>palindrome(\"almostomla\")</code> should return false.",
|
||||
"testString": "assert(palindrome(\"almostomla\") === false, '<code>palindrome(\"almostomla\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"My age is 0, 0 si ega ym.\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"My age is 0, 0 si ega ym.\") === true, '<code>palindrome(\"My age is 0, 0 si ega ym.\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"My age is 0, 0 si ega ym.\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"My age is 0, 0 si ega ym.\") === true, '<code>palindrome(\"My age is 0, 0 si ega ym.\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"1 eye for of 1 eye.\")</code> should return false.'",
|
||||
"testString": "assert(palindrome(\"1 eye for of 1 eye.\") === false, '<code>palindrome(\"1 eye for of 1 eye.\")</code> should return false.')"
|
||||
"text": "<code>palindrome(\"1 eye for of 1 eye.\")</code> should return false.",
|
||||
"testString": "assert(palindrome(\"1 eye for of 1 eye.\") === false, '<code>palindrome(\"1 eye for of 1 eye.\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"0_0 (: /-\\ :) 0-0\")</code> should return true.'",
|
||||
"testString": "assert(palindrome(\"0_0 (: /-\\ :) 0-0\") === true, '<code>palindrome(\"0_0 (: /-\\ :) 0-0\")</code> should return true.')"
|
||||
"text": "<code>palindrome(\"0_0 (: /-\\ :) 0-0\")</code> should return true.",
|
||||
"testString": "assert(palindrome(\"0_0 (: /-\\ :) 0-0\") === true, '<code>palindrome(\"0_0 (: /-\\ :) 0-0\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>palindrome(\"five|\\_/|four\")</code> should return false.'",
|
||||
"testString": "assert(palindrome(\"five|\\_/|four\") === false, '<code>palindrome(\"five|\\_/|four\")</code> should return false.')"
|
||||
"text": "<code>palindrome(\"five|\\_/|four\")</code> should return false.",
|
||||
"testString": "assert(palindrome(\"five|\\_/|four\") === false, '<code>palindrome(\"five|\\_/|four\")</code> should return false.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -136,108 +136,108 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>convertToRoman(2)</code> should return \"II\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(2), '<code>convertToRoman(2)</code> should return \"II\".')"
|
||||
"text": "<code>convertToRoman(2)</code> should return \"II\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(2), \"II\", '<code>convertToRoman(2)</code> should return \"II\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(3)</code> should return \"III\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(3), '<code>convertToRoman(3)</code> should return \"III\".')"
|
||||
"text": "<code>convertToRoman(3)</code> should return \"III\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(3), \"III\", '<code>convertToRoman(3)</code> should return \"III\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(4)</code> should return \"IV\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(4), '<code>convertToRoman(4)</code> should return \"IV\".')"
|
||||
"text": "<code>convertToRoman(4)</code> should return \"IV\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(4), \"IV\", '<code>convertToRoman(4)</code> should return \"IV\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(5)</code> should return \"V\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(5), '<code>convertToRoman(5)</code> should return \"V\".')"
|
||||
"text": "<code>convertToRoman(5)</code> should return \"V\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(5), \"V\", '<code>convertToRoman(5)</code> should return \"V\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(9)</code> should return \"IX\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(9), '<code>convertToRoman(9)</code> should return \"IX\".')"
|
||||
"text": "<code>convertToRoman(9)</code> should return \"IX\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(9), \"IX\", '<code>convertToRoman(9)</code> should return \"IX\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(12)</code> should return \"XII\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(12), '<code>convertToRoman(12)</code> should return \"XII\".')"
|
||||
"text": "<code>convertToRoman(12)</code> should return \"XII\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(12), \"XII\", '<code>convertToRoman(12)</code> should return \"XII\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(16)</code> should return \"XVI\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(16), '<code>convertToRoman(16)</code> should return \"XVI\".')"
|
||||
"text": "<code>convertToRoman(16)</code> should return \"XVI\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(16), \"XVI\", '<code>convertToRoman(16)</code> should return \"XVI\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(29)</code> should return \"XXIX\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(29), '<code>convertToRoman(29)</code> should return \"XXIX\".')"
|
||||
"text": "<code>convertToRoman(29)</code> should return \"XXIX\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(29), \"XXIX\", '<code>convertToRoman(29)</code> should return \"XXIX\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(44)</code> should return \"XLIV\".'",
|
||||
"testString": "assert.deepEqual(convertToRoman(44), '<code>convertToRoman(44)</code> should return \"XLIV\".')"
|
||||
"text": "<code>convertToRoman(44)</code> should return \"XLIV\".",
|
||||
"testString": "assert.deepEqual(convertToRoman(44), \"XLIV\", '<code>convertToRoman(44)</code> should return \"XLIV\".');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(45)</code> should return \"XLV\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(45), '<code>convertToRoman(45)</code> should return \"XLV\"')"
|
||||
"text": "<code>convertToRoman(45)</code> should return \"XLV\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(45), \"XLV\", '<code>convertToRoman(45)</code> should return \"XLV\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(68)</code> should return \"LXVIII\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(68), '<code>convertToRoman(68)</code> should return \"LXVIII\"')"
|
||||
"text": "<code>convertToRoman(68)</code> should return \"LXVIII\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(68), \"LXVIII\", '<code>convertToRoman(68)</code> should return \"LXVIII\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(83)</code> should return \"LXXXIII\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(83), '<code>convertToRoman(83)</code> should return \"LXXXIII\"')"
|
||||
"text": "<code>convertToRoman(83)</code> should return \"LXXXIII\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(83), \"LXXXIII\", '<code>convertToRoman(83)</code> should return \"LXXXIII\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(97)</code> should return \"XCVII\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(97), '<code>convertToRoman(97)</code> should return \"XCVII\"')"
|
||||
"text": "<code>convertToRoman(97)</code> should return \"XCVII\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(97), \"XCVII\", '<code>convertToRoman(97)</code> should return \"XCVII\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(99)</code> should return \"XCIX\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(99), '<code>convertToRoman(99)</code> should return \"XCIX\"')"
|
||||
"text": "<code>convertToRoman(99)</code> should return \"XCIX\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(99), \"XCIX\", '<code>convertToRoman(99)</code> should return \"XCIX\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(400)</code> should return \"CD\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(400), '<code>convertToRoman(400)</code> should return \"CD\"')"
|
||||
"text": "<code>convertToRoman(400)</code> should return \"CD\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(400), \"CD\", '<code>convertToRoman(400)</code> should return \"CD\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(500)</code> should return \"D\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(500), '<code>convertToRoman(500)</code> should return \"D\"')"
|
||||
"text": "<code>convertToRoman(500)</code> should return \"D\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(500), \"D\", '<code>convertToRoman(500)</code> should return \"D\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(501)</code> should return \"DI\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(501), '<code>convertToRoman(501)</code> should return \"DI\"')"
|
||||
"text": "<code>convertToRoman(501)</code> should return \"DI\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(501), \"DI\", '<code>convertToRoman(501)</code> should return \"DI\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(649)</code> should return \"DCXLIX\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(649), '<code>convertToRoman(649)</code> should return \"DCXLIX\"')"
|
||||
"text": "<code>convertToRoman(649)</code> should return \"DCXLIX\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(649), \"DCXLIX\", '<code>convertToRoman(649)</code> should return \"DCXLIX\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(798)</code> should return \"DCCXCVIII\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(798), '<code>convertToRoman(798)</code> should return \"DCCXCVIII\"')"
|
||||
"text": "<code>convertToRoman(798)</code> should return \"DCCXCVIII\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(798), \"DCCXCVIII\", '<code>convertToRoman(798)</code> should return \"DCCXCVIII\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(891)</code> should return \"DCCCXCI\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(891), '<code>convertToRoman(891)</code> should return \"DCCCXCI\"')"
|
||||
"text": "<code>convertToRoman(891)</code> should return \"DCCCXCI\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(891), \"DCCCXCI\", '<code>convertToRoman(891)</code> should return \"DCCCXCI\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(1000)</code> should return \"M\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(1000), '<code>convertToRoman(1000)</code> should return \"M\"')"
|
||||
"text": "<code>convertToRoman(1000)</code> should return \"M\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(1000), \"M\", '<code>convertToRoman(1000)</code> should return \"M\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(1004)</code> should return \"MIV\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(1004), '<code>convertToRoman(1004)</code> should return \"MIV\"')"
|
||||
"text": "<code>convertToRoman(1004)</code> should return \"MIV\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(1004), \"MIV\", '<code>convertToRoman(1004)</code> should return \"MIV\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(1006)</code> should return \"MVI\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(1006), '<code>convertToRoman(1006)</code> should return \"MVI\"')"
|
||||
"text": "<code>convertToRoman(1006)</code> should return \"MVI\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(1006), \"MVI\", '<code>convertToRoman(1006)</code> should return \"MVI\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(1023)</code> should return \"MXXIII\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(1023), '<code>convertToRoman(1023)</code> should return \"MXXIII\"')"
|
||||
"text": "<code>convertToRoman(1023)</code> should return \"MXXIII\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(1023), \"MXXIII\", '<code>convertToRoman(1023)</code> should return \"MXXIII\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(2014)</code> should return \"MMXIV\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(2014), '<code>convertToRoman(2014)</code> should return \"MMXIV\"')"
|
||||
"text": "<code>convertToRoman(2014)</code> should return \"MMXIV\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(2014), \"MMXIV\", '<code>convertToRoman(2014)</code> should return \"MMXIV\"');"
|
||||
},
|
||||
{
|
||||
"text": "<code>convertToRoman(3999)</code> should return \"MMMCMXCIX\"'",
|
||||
"testString": "assert.deepEqual(convertToRoman(3999), '<code>convertToRoman(3999)</code> should return \"MMMCMXCIX\"')"
|
||||
"text": "<code>convertToRoman(3999)</code> should return \"MMMCMXCIX\"",
|
||||
"testString": "assert.deepEqual(convertToRoman(3999), \"MMMCMXCIX\", '<code>convertToRoman(3999)</code> should return \"MMMCMXCIX\"');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -299,20 +299,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>rot13(\"SERR PBQR PNZC\")</code> should decode to <code>FREE CODE CAMP</code>'",
|
||||
"testString": "assert(rot13(\"SERR PBQR PNZC\") === \"FREE CODE CAMP\", '<code>rot13(\"SERR PBQR PNZC\")</code> should decode to <code>FREE CODE CAMP</code>')"
|
||||
"text": "<code>rot13(\"SERR PBQR PNZC\")</code> should decode to <code>FREE CODE CAMP</code>",
|
||||
"testString": "assert(rot13(\"SERR PBQR PNZC\") === \"FREE CODE CAMP\", '<code>rot13(\"SERR PBQR PNZC\")</code> should decode to <code>FREE CODE CAMP</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>rot13(\"SERR CVMMN!\")</code> should decode to <code>FREE PIZZA!</code>'",
|
||||
"testString": "assert(rot13(\"SERR CVMMN!\") === \"FREE PIZZA!\", '<code>rot13(\"SERR CVMMN!\")</code> should decode to <code>FREE PIZZA!</code>')"
|
||||
"text": "<code>rot13(\"SERR CVMMN!\")</code> should decode to <code>FREE PIZZA!</code>",
|
||||
"testString": "assert(rot13(\"SERR CVMMN!\") === \"FREE PIZZA!\", '<code>rot13(\"SERR CVMMN!\")</code> should decode to <code>FREE PIZZA!</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>rot13(\"SERR YBIR?\")</code> should decode to <code>FREE LOVE?</code>'",
|
||||
"testString": "assert(rot13(\"SERR YBIR?\") === \"FREE LOVE?\", '<code>rot13(\"SERR YBIR?\")</code> should decode to <code>FREE LOVE?</code>')"
|
||||
"text": "<code>rot13(\"SERR YBIR?\")</code> should decode to <code>FREE LOVE?</code>",
|
||||
"testString": "assert(rot13(\"SERR YBIR?\") === \"FREE LOVE?\", '<code>rot13(\"SERR YBIR?\")</code> should decode to <code>FREE LOVE?</code>');"
|
||||
},
|
||||
{
|
||||
"text": "<code>rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\")</code> should decode to <code>THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.</code>'",
|
||||
"testString": "assert(rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\") === \"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.\", '<code>rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\")</code> should decode to <code>THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.</code>')"
|
||||
"text": "<code>rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\")</code> should decode to <code>THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.</code>",
|
||||
"testString": "assert(rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\") === \"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.\", '<code>rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\")</code> should decode to <code>THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.</code>');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -379,112 +379,112 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"555-555-5555\")</code> should return a boolean.'",
|
||||
"testString": "assert(typeof telephoneCheck(\"555-555-5555\") === \"boolean\", '<code>telephoneCheck(\"555-555-5555\")</code> should return a boolean.')"
|
||||
"text": "<code>telephoneCheck(\"555-555-5555\")</code> should return a boolean.",
|
||||
"testString": "assert(typeof telephoneCheck(\"555-555-5555\") === \"boolean\", '<code>telephoneCheck(\"555-555-5555\")</code> should return a boolean.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1 555-555-5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"1 555-555-5555\") === true, '<code>telephoneCheck(\"1 555-555-5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"1 555-555-5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"1 555-555-5555\") === true, '<code>telephoneCheck(\"1 555-555-5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1 (555) 555-5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"1 (555) 555-5555\") === true, '<code>telephoneCheck(\"1 (555) 555-5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"1 (555) 555-5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"1 (555) 555-5555\") === true, '<code>telephoneCheck(\"1 (555) 555-5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"5555555555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"5555555555\") === true, '<code>telephoneCheck(\"5555555555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"5555555555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"5555555555\") === true, '<code>telephoneCheck(\"5555555555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"555-555-5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"555-555-5555\") === true, '<code>telephoneCheck(\"555-555-5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"555-555-5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"555-555-5555\") === true, '<code>telephoneCheck(\"555-555-5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"(555)555-5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"(555)555-5555\") === true, '<code>telephoneCheck(\"(555)555-5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"(555)555-5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"(555)555-5555\") === true, '<code>telephoneCheck(\"(555)555-5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1(555)555-5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"1(555)555-5555\") === true, '<code>telephoneCheck(\"1(555)555-5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"1(555)555-5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"1(555)555-5555\") === true, '<code>telephoneCheck(\"1(555)555-5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"555-5555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"555-5555\") === false, '<code>telephoneCheck(\"555-5555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"555-5555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"555-5555\") === false, '<code>telephoneCheck(\"555-5555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"5555555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"5555555\") === false, '<code>telephoneCheck(\"5555555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"5555555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"5555555\") === false, '<code>telephoneCheck(\"5555555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1 555)555-5555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"1 555)555-5555\") === false, '<code>telephoneCheck(\"1 555)555-5555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"1 555)555-5555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"1 555)555-5555\") === false, '<code>telephoneCheck(\"1 555)555-5555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1 555 555 5555\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"1 555 555 5555\") === true, '<code>telephoneCheck(\"1 555 555 5555\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"1 555 555 5555\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"1 555 555 5555\") === true, '<code>telephoneCheck(\"1 555 555 5555\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"1 456 789 4444\")</code> should return true.'",
|
||||
"testString": "assert(telephoneCheck(\"1 456 789 4444\") === true, '<code>telephoneCheck(\"1 456 789 4444\")</code> should return true.')"
|
||||
"text": "<code>telephoneCheck(\"1 456 789 4444\")</code> should return true.",
|
||||
"testString": "assert(telephoneCheck(\"1 456 789 4444\") === true, '<code>telephoneCheck(\"1 456 789 4444\")</code> should return true.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"123**&!!asdf#\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"123**&!!asdf#\") === false, '<code>telephoneCheck(\"123**&!!asdf#\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"123**&!!asdf#\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"123**&!!asdf#\") === false, '<code>telephoneCheck(\"123**&!!asdf#\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"55555555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"55555555\") === false, '<code>telephoneCheck(\"55555555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"55555555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"55555555\") === false, '<code>telephoneCheck(\"55555555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"(6054756961)\")</code> should return false'",
|
||||
"testString": "assert(telephoneCheck(\"(6054756961)\") === false, '<code>telephoneCheck(\"(6054756961)\")</code> should return false')"
|
||||
"text": "<code>telephoneCheck(\"(6054756961)\")</code> should return false",
|
||||
"testString": "assert(telephoneCheck(\"(6054756961)\") === false, '<code>telephoneCheck(\"(6054756961)\")</code> should return false');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"2 (757) 622-7382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"2 (757) 622-7382\") === false, '<code>telephoneCheck(\"2 (757) 622-7382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"2 (757) 622-7382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"2 (757) 622-7382\") === false, '<code>telephoneCheck(\"2 (757) 622-7382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"0 (757) 622-7382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"0 (757) 622-7382\") === false, '<code>telephoneCheck(\"0 (757) 622-7382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"0 (757) 622-7382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"0 (757) 622-7382\") === false, '<code>telephoneCheck(\"0 (757) 622-7382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"-1 (757) 622-7382\")</code> should return false'",
|
||||
"testString": "assert(telephoneCheck(\"-1 (757) 622-7382\") === false, '<code>telephoneCheck(\"-1 (757) 622-7382\")</code> should return false')"
|
||||
"text": "<code>telephoneCheck(\"-1 (757) 622-7382\")</code> should return false",
|
||||
"testString": "assert(telephoneCheck(\"-1 (757) 622-7382\") === false, '<code>telephoneCheck(\"-1 (757) 622-7382\")</code> should return false');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"2 757 622-7382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"2 757 622-7382\") === false, '<code>telephoneCheck(\"2 757 622-7382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"2 757 622-7382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"2 757 622-7382\") === false, '<code>telephoneCheck(\"2 757 622-7382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"10 (757) 622-7382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"10 (757) 622-7382\") === false, '<code>telephoneCheck(\"10 (757) 622-7382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"10 (757) 622-7382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"10 (757) 622-7382\") === false, '<code>telephoneCheck(\"10 (757) 622-7382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"27576227382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"27576227382\") === false, '<code>telephoneCheck(\"27576227382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"27576227382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"27576227382\") === false, '<code>telephoneCheck(\"27576227382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"(275)76227382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"(275)76227382\") === false, '<code>telephoneCheck(\"(275)76227382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"(275)76227382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"(275)76227382\") === false, '<code>telephoneCheck(\"(275)76227382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"2(757)6227382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"2(757)6227382\") === false, '<code>telephoneCheck(\"2(757)6227382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"2(757)6227382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"2(757)6227382\") === false, '<code>telephoneCheck(\"2(757)6227382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"2(757)622-7382\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"2(757)622-7382\") === false, '<code>telephoneCheck(\"2(757)622-7382\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"2(757)622-7382\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"2(757)622-7382\") === false, '<code>telephoneCheck(\"2(757)622-7382\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"555)-555-5555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"555)-555-5555\") === false, '<code>telephoneCheck(\"555)-555-5555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"555)-555-5555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"555)-555-5555\") === false, '<code>telephoneCheck(\"555)-555-5555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"(555-555-5555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"(555-555-5555\") === false, '<code>telephoneCheck(\"(555-555-5555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"(555-555-5555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"(555-555-5555\") === false, '<code>telephoneCheck(\"(555-555-5555\")</code> should return false.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>telephoneCheck(\"(555)5(55?)-5555\")</code> should return false.'",
|
||||
"testString": "assert(telephoneCheck(\"(555)5(55?)-5555\") === false, '<code>telephoneCheck(\"(555)5(55?)-5555\")</code> should return false.')"
|
||||
"text": "<code>telephoneCheck(\"(555)5(55?)-5555\")</code> should return false.",
|
||||
"testString": "assert(telephoneCheck(\"(555)5(55?)-5555\") === false, '<code>telephoneCheck(\"(555)5(55?)-5555\")</code> should return false.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
@ -561,28 +561,28 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return an object.'",
|
||||
"testString": "assert.deepEqual(Object.prototype.toString.call(checkCashRegister(19.5, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return an object.')"
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return an object.",
|
||||
"testString": "assert.deepEqual(Object.prototype.toString.call(checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])), '[object Object]', '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return an object.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"QUARTER\", 0.5]]}</code>.'",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"QUARTER\", 0.5]]}</code>.')"
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"QUARTER\", 0.5]]}</code>.",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]]), {status: \"OPEN\", change: [[\"QUARTER\", 0.5]]}, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"QUARTER\", 0.5]]}</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkCashRegister(3.26, 100, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"TWENTY\", 60], [\"TEN\", 20], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.5], [\"DIME\", 0.2], [\"PENNY\", 0.04]]}</code>.'",
|
||||
"testString": "assert.deepEqual(checkCashRegister(3.26, '<code>checkCashRegister(3.26, 100, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"TWENTY\", 60], [\"TEN\", 20], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.5], [\"DIME\", 0.2], [\"PENNY\", 0.04]]}</code>.')"
|
||||
"text": "<code>checkCashRegister(3.26, 100, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"TWENTY\", 60], [\"TEN\", 20], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.5], [\"DIME\", 0.2], [\"PENNY\", 0.04]]}</code>.",
|
||||
"testString": "assert.deepEqual(checkCashRegister(3.26, 100, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]]), {status: \"OPEN\", change: [[\"TWENTY\", 60], [\"TEN\", 20], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.5], [\"DIME\", 0.2], [\"PENNY\", 0.04]]}, '<code>checkCashRegister(3.26, 100, [[\"PENNY\", 1.01], [\"NICKEL\", 2.05], [\"DIME\", 3.1], [\"QUARTER\", 4.25], [\"ONE\", 90], [\"FIVE\", 55], [\"TEN\", 20], [\"TWENTY\", 60], [\"ONE HUNDRED\", 100]])</code> should return <code>{status: \"OPEN\", change: [[\"TWENTY\", 60], [\"TEN\", 20], [\"FIVE\", 15], [\"ONE\", 1], [\"QUARTER\", 0.5], [\"DIME\", 0.2], [\"PENNY\", 0.04]]}</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.'",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.')"
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), {status: \"INSUFFICIENT_FUNDS\", change: []}, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 1], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.'",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 1], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.')"
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 1], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 1], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), {status: \"INSUFFICIENT_FUNDS\", change: []}, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.01], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 1], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"INSUFFICIENT_FUNDS\", change: []}</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}</code>.'",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}</code>.')"
|
||||
"text": "<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}</code>.",
|
||||
"testString": "assert.deepEqual(checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), {status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}</code>.');"
|
||||
}
|
||||
],
|
||||
"type": "bonfire",
|
||||
|
@ -19,16 +19,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>dog</code> should be an <code>object</code>.'",
|
||||
"testString": "assert(typeof(dog) === 'object', '<code>dog</code> should be an <code>object</code>.')"
|
||||
"text": "<code>dog</code> should be an <code>object</code>.",
|
||||
"testString": "assert(typeof(dog) === 'object', '<code>dog</code> should be an <code>object</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dog</code> should have a <code>name</code> property set to a <code>string</code>.'",
|
||||
"testString": "assert(typeof(dog.name) === 'string', '<code>dog</code> should have a <code>name</code> property set to a <code>string</code>.')"
|
||||
"text": "<code>dog</code> should have a <code>name</code> property set to a <code>string</code>.",
|
||||
"testString": "assert(typeof(dog.name) === 'string', '<code>dog</code> should have a <code>name</code> property set to a <code>string</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dog</code> should have a <code>numLegs</code> property set to a <code>number</code>.'",
|
||||
"testString": "assert(typeof(dog.numLegs) === 'number', '<code>dog</code> should have a <code>numLegs</code> property set to a <code>number</code>.')"
|
||||
"text": "<code>dog</code> should have a <code>numLegs</code> property set to a <code>number</code>.",
|
||||
"testString": "assert(typeof(dog.numLegs) === 'number', '<code>dog</code> should have a <code>numLegs</code> property set to a <code>number</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -66,12 +66,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your should use <code>console.log</code> to print the value for the <code>name</code> property of the <code>dog</code> object.'",
|
||||
"testString": "assert(/console.log\\(.*dog\\.name.*\\)/g.test(code), 'Your should use <code>console.log</code> to print the value for the <code>name</code> property of the <code>dog</code> object.')"
|
||||
"text": "Your should use <code>console.log</code> to print the value for the <code>name</code> property of the <code>dog</code> object.",
|
||||
"testString": "assert(/console.log\\(.*dog\\.name.*\\)/g.test(code), 'Your should use <code>console.log</code> to print the value for the <code>name</code> property of the <code>dog</code> object.');"
|
||||
},
|
||||
{
|
||||
"text": "Your should use <code>console.log</code> to print the value for the <code>numLegs</code> property of the <code>dog</code> object.'",
|
||||
"testString": "assert(/console.log\\(.*dog\\.numLegs.*\\)/g.test(code), 'Your should use <code>console.log</code> to print the value for the <code>numLegs</code> property of the <code>dog</code> object.')"
|
||||
"text": "Your should use <code>console.log</code> to print the value for the <code>numLegs</code> property of the <code>dog</code> object.",
|
||||
"testString": "assert(/console.log\\(.*dog\\.numLegs.*\\)/g.test(code), 'Your should use <code>console.log</code> to print the value for the <code>numLegs</code> property of the <code>dog</code> object.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -115,12 +115,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>dog.sayLegs()</code> should be a function.'",
|
||||
"testString": "assert(typeof(dog.sayLegs) === 'function', '<code>dog.sayLegs()</code> should be a function.')"
|
||||
"text": "<code>dog.sayLegs()</code> should be a function.",
|
||||
"testString": "assert(typeof(dog.sayLegs) === 'function', '<code>dog.sayLegs()</code> should be a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>dog.sayLegs()</code> should return the given string - note that punctuation and spacing matter.'",
|
||||
"testString": "assert(dog.sayLegs() === 'This dog has 4 legs.', '<code>dog.sayLegs()</code> should return the given string - note that punctuation and spacing matter.')"
|
||||
"text": "<code>dog.sayLegs()</code> should return the given string - note that punctuation and spacing matter.",
|
||||
"testString": "assert(dog.sayLegs() === 'This dog has 4 legs.', '<code>dog.sayLegs()</code> should return the given string - note that punctuation and spacing matter.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -166,12 +166,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>dog.sayLegs()</code> should return the given string.'",
|
||||
"testString": "assert(dog.sayLegs() === 'This dog has 4 legs.', '<code>dog.sayLegs()</code> should return the given string.')"
|
||||
"text": "<code>dog.sayLegs()</code> should return the given string.",
|
||||
"testString": "assert(dog.sayLegs() === 'This dog has 4 legs.', '<code>dog.sayLegs()</code> should return the given string.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>this</code> keyword to access the <code>numLegs</code> property of <code>dog</code>.'",
|
||||
"testString": "assert(code.match(/this\\.numLegs/g), 'Your code should use the <code>this</code> keyword to access the <code>numLegs</code> property of <code>dog</code>.')"
|
||||
"text": "Your code should use the <code>this</code> keyword to access the <code>numLegs</code> property of <code>dog</code>.",
|
||||
"testString": "assert(code.match(/this\\.numLegs/g), 'Your code should use the <code>this</code> keyword to access the <code>numLegs</code> property of <code>dog</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -217,16 +217,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Dog</code> should have a <code>name</code> property set to a string.'",
|
||||
"testString": "assert(typeof (new Dog()).name === 'string', '<code>Dog</code> should have a <code>name</code> property set to a string.')"
|
||||
"text": "<code>Dog</code> should have a <code>name</code> property set to a string.",
|
||||
"testString": "assert(typeof (new Dog()).name === 'string', '<code>Dog</code> should have a <code>name</code> property set to a string.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should have a <code>color</code> property set to a string.'",
|
||||
"testString": "assert(typeof (new Dog()).color === 'string', '<code>Dog</code> should have a <code>color</code> property set to a string.')"
|
||||
"text": "<code>Dog</code> should have a <code>color</code> property set to a string.",
|
||||
"testString": "assert(typeof (new Dog()).color === 'string', '<code>Dog</code> should have a <code>color</code> property set to a string.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should have a <code>numLegs</code> property set to a number.'",
|
||||
"testString": "assert(typeof (new Dog()).numLegs === 'number', '<code>Dog</code> should have a <code>numLegs</code> property set to a number.')"
|
||||
"text": "<code>Dog</code> should have a <code>numLegs</code> property set to a number.",
|
||||
"testString": "assert(typeof (new Dog()).numLegs === 'number', '<code>Dog</code> should have a <code>numLegs</code> property set to a number.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -268,12 +268,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>hound</code> should be created using the <code>Dog</code> constructor.'",
|
||||
"testString": "assert(hound instanceof Dog, '<code>hound</code> should be created using the <code>Dog</code> constructor.')"
|
||||
"text": "<code>hound</code> should be created using the <code>Dog</code> constructor.",
|
||||
"testString": "assert(hound instanceof Dog, '<code>hound</code> should be created using the <code>Dog</code> constructor.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>new</code> operator to create an <code>instance</code> of <code>Dog</code>.'",
|
||||
"testString": "assert(code.match(/new/g), 'Your code should use the <code>new</code> operator to create an <code>instance</code> of <code>Dog</code>.')"
|
||||
"text": "Your code should use the <code>new</code> operator to create an <code>instance</code> of <code>Dog</code>.",
|
||||
"testString": "assert(code.match(/new/g), 'Your code should use the <code>new</code> operator to create an <code>instance</code> of <code>Dog</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -324,20 +324,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Dog</code> should receive an argument for <code>name</code>.'",
|
||||
"testString": "assert((new Dog('Clifford')).name === 'Clifford', '<code>Dog</code> should receive an argument for <code>name</code>.')"
|
||||
"text": "<code>Dog</code> should receive an argument for <code>name</code>.",
|
||||
"testString": "assert((new Dog('Clifford')).name === 'Clifford', '<code>Dog</code> should receive an argument for <code>name</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should receive an argument for <code>color</code>.'",
|
||||
"testString": "assert((new Dog('Clifford', '<code>Dog</code> should receive an argument for <code>color</code>.')"
|
||||
"text": "<code>Dog</code> should receive an argument for <code>color</code>.",
|
||||
"testString": "assert((new Dog('Clifford', 'yellow')).color === 'yellow', '<code>Dog</code> should receive an argument for <code>color</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should have property <code>numLegs</code> set to 4.'",
|
||||
"testString": "assert((new Dog('Clifford')).numLegs === 4, '<code>Dog</code> should have property <code>numLegs</code> set to 4.')"
|
||||
"text": "<code>Dog</code> should have property <code>numLegs</code> set to 4.",
|
||||
"testString": "assert((new Dog('Clifford')).numLegs === 4, '<code>Dog</code> should have property <code>numLegs</code> set to 4.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>terrier</code> should be created using the <code>Dog</code> constructor.'",
|
||||
"testString": "assert(terrier instanceof Dog, '<code>terrier</code> should be created using the <code>Dog</code> constructor.')"
|
||||
"text": "<code>terrier</code> should be created using the <code>Dog</code> constructor.",
|
||||
"testString": "assert(terrier instanceof Dog, '<code>terrier</code> should be created using the <code>Dog</code> constructor.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -378,12 +378,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>myHouse</code> should have a <code>numBedrooms</code> attribute set to a number.'",
|
||||
"testString": "assert(typeof myHouse.numBedrooms === 'number', '<code>myHouse</code> should have a <code>numBedrooms</code> attribute set to a number.')"
|
||||
"text": "<code>myHouse</code> should have a <code>numBedrooms</code> attribute set to a number.",
|
||||
"testString": "assert(typeof myHouse.numBedrooms === 'number', '<code>myHouse</code> should have a <code>numBedrooms</code> attribute set to a number.');"
|
||||
},
|
||||
{
|
||||
"text": "Be sure to verify that <code>myHouse</code> is an instance of <code>House</code> using the <code>instanceof</code> operator.'",
|
||||
"testString": "assert(/myHouse\\s*instanceof\\s*House/.test(code), 'Be sure to verify that <code>myHouse</code> is an instance of <code>House</code> using the <code>instanceof</code> operator.')"
|
||||
"text": "Be sure to verify that <code>myHouse</code> is an instance of <code>House</code> using the <code>instanceof</code> operator.",
|
||||
"testString": "assert(/myHouse\\s*instanceof\\s*House/.test(code), 'Be sure to verify that <code>myHouse</code> is an instance of <code>House</code> using the <code>instanceof</code> operator.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -431,12 +431,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.'",
|
||||
"testString": "assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1, '<code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.')"
|
||||
"text": "<code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.",
|
||||
"testString": "assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1, '<code>ownProps</code> should include the values <code>\"numLegs\"</code> and <code>\"name\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Solve this challenge without using the built in method <code>Object.keys()</code>.'",
|
||||
"testString": "assert(!/\\Object.keys/.test(code), 'Solve this challenge without using the built in method <code>Object.keys()</code>.')"
|
||||
"text": "Solve this challenge without using the built in method <code>Object.keys()</code>.",
|
||||
"testString": "assert(!/\\Object.keys/.test(code), 'Solve this challenge without using the built in method <code>Object.keys()</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -487,16 +487,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>beagle</code> should have a <code>numLegs</code> property.'",
|
||||
"testString": "assert(beagle.numLegs !== undefined, '<code>beagle</code> should have a <code>numLegs</code> property.')"
|
||||
"text": "<code>beagle</code> should have a <code>numLegs</code> property.",
|
||||
"testString": "assert(beagle.numLegs !== undefined, '<code>beagle</code> should have a <code>numLegs</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>beagle.numLegs</code> should be a number.'",
|
||||
"testString": "assert(typeof(beagle.numLegs) === 'number' , '<code>beagle.numLegs</code> should be a number.')"
|
||||
"text": "<code>beagle.numLegs</code> should be a number.",
|
||||
"testString": "assert(typeof(beagle.numLegs) === 'number' , '<code>beagle.numLegs</code> should be a number.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>numLegs</code> should be a <code>prototype</code> property not an <code>own</code> property.'",
|
||||
"testString": "assert(beagle.hasOwnProperty('numLegs') === false, '<code>numLegs</code> should be a <code>prototype</code> property not an <code>own</code> property.')"
|
||||
"text": "<code>numLegs</code> should be a <code>prototype</code> property not an <code>own</code> property.",
|
||||
"testString": "assert(beagle.hasOwnProperty('numLegs') === false, '<code>numLegs</code> should be a <code>prototype</code> property not an <code>own</code> property.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -540,16 +540,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>ownProps</code> array should include <code>\"name\"</code>.'",
|
||||
"testString": "assert(ownProps.indexOf('name') !== -1, 'The <code>ownProps</code> array should include <code>\"name\"</code>.')"
|
||||
"text": "The <code>ownProps</code> array should include <code>\"name\"</code>.",
|
||||
"testString": "assert(ownProps.indexOf('name') !== -1, 'The <code>ownProps</code> array should include <code>\"name\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.'",
|
||||
"testString": "assert(prototypeProps.indexOf('numLegs') !== -1, 'The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.')"
|
||||
"text": "The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.",
|
||||
"testString": "assert(prototypeProps.indexOf('numLegs') !== -1, 'The <code>prototypeProps</code> array should include <code>\"numLegs\"</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "Solve this challenge without using the built in method <code>Object.keys()</code>.'",
|
||||
"testString": "assert(!/\\Object.keys/.test(code), 'Solve this challenge without using the built in method <code>Object.keys()</code>.')"
|
||||
"text": "Solve this challenge without using the built in method <code>Object.keys()</code>.",
|
||||
"testString": "assert(!/\\Object.keys/.test(code), 'Solve this challenge without using the built in method <code>Object.keys()</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -602,16 +602,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>joinDogFraternity</code> should be defined as a function.'",
|
||||
"testString": "assert(typeof(joinDogFraternity) === 'function', '<code>joinDogFraternity</code> should be defined as a function.')"
|
||||
"text": "<code>joinDogFraternity</code> should be defined as a function.",
|
||||
"testString": "assert(typeof(joinDogFraternity) === 'function', '<code>joinDogFraternity</code> should be defined as a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>joinDogFraternity</code> should return true if<code>candidate</code> is an instance of <code>Dog</code>.'",
|
||||
"testString": "assert(joinDogFraternity(new Dog(\"\")) === true, '<code>joinDogFraternity</code> should return true if<code>candidate</code> is an instance of <code>Dog</code>.')"
|
||||
"text": "<code>joinDogFraternity</code> should return true if<code>candidate</code> is an instance of <code>Dog</code>.",
|
||||
"testString": "assert(joinDogFraternity(new Dog(\"\")) === true, '<code>joinDogFraternity</code> should return true if<code>candidate</code> is an instance of <code>Dog</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>joinDogFraternity</code> should use the <code>constructor</code> property.'",
|
||||
"testString": "assert(/\\.constructor/.test(code) && !/instanceof/.test(code), '<code>joinDogFraternity</code> should use the <code>constructor</code> property.')"
|
||||
"text": "<code>joinDogFraternity</code> should use the <code>constructor</code> property.",
|
||||
"testString": "assert(/\\.constructor/.test(code) && !/instanceof/.test(code), '<code>joinDogFraternity</code> should use the <code>constructor</code> property.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -658,12 +658,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should be set to a new object.'",
|
||||
"testString": "assert((/Dog\\.prototype\\s*?=\\s*?{/).test(code), '<code>Dog.prototype</code> should be set to a new object.')"
|
||||
"text": "<code>Dog.prototype</code> should be set to a new object.",
|
||||
"testString": "assert((/Dog\\.prototype\\s*?=\\s*?{/).test(code), '<code>Dog.prototype</code> should be set to a new object.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should have the property <code>numLegs</code>.'",
|
||||
"testString": "assert(Dog.prototype.numLegs !== undefined, '<code>Dog.prototype</code> should have the property <code>numLegs</code>.')"
|
||||
"text": "<code>Dog.prototype</code> should have the property <code>numLegs</code>.",
|
||||
"testString": "assert(Dog.prototype.numLegs !== undefined, '<code>Dog.prototype</code> should have the property <code>numLegs</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should have the method <code>eat()</code>.",
|
||||
@ -715,8 +715,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should set the <code>constructor</code> property.'",
|
||||
"testString": "assert(Dog.prototype.constructor === Dog, '<code>Dog.prototype</code> should set the <code>constructor</code> property.')"
|
||||
"text": "<code>Dog.prototype</code> should set the <code>constructor</code> property.",
|
||||
"testString": "assert(Dog.prototype.constructor === Dog, '<code>Dog.prototype</code> should set the <code>constructor</code> property.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -767,8 +767,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Show that <code>Dog.prototype</code> is the <code>prototype</code> of <code>beagle</code>'",
|
||||
"testString": "assert(/Dog\\.prototype\\.isPrototypeOf\\(beagle\\)/.test(code), 'Show that <code>Dog.prototype</code> is the <code>prototype</code> of <code>beagle</code>')"
|
||||
"text": "Show that <code>Dog.prototype</code> is the <code>prototype</code> of <code>beagle</code>",
|
||||
"testString": "assert(/Dog\\.prototype\\.isPrototypeOf\\(beagle\\)/.test(code), 'Show that <code>Dog.prototype</code> is the <code>prototype</code> of <code>beagle</code>');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -819,7 +819,7 @@
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should show that <code>Object.prototype</code> is the prototype of <code>Dog.prototype</code>\"",
|
||||
"testString": "assert(/Object\\.prototype\\.isPrototypeOf/.test(code), 'Your code should show that <code>Object.prototype</code> is the prototype of <code>Dog.prototype</code>\")"
|
||||
"testString": "assert(/Object\\.prototype\\.isPrototypeOf/.test(code), 'Your code should show that <code>Object.prototype</code> is the prototype of <code>Dog.prototype</code>\"');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -869,16 +869,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Animal.prototype</code> should have the <code>eat</code> property.'",
|
||||
"testString": "assert(Animal.prototype.hasOwnProperty('eat'), '<code>Animal.prototype</code> should have the <code>eat</code> property.')"
|
||||
"text": "<code>Animal.prototype</code> should have the <code>eat</code> property.",
|
||||
"testString": "assert(Animal.prototype.hasOwnProperty('eat'), '<code>Animal.prototype</code> should have the <code>eat</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Bear.prototype</code> should not have the <code>eat</code> property.'",
|
||||
"testString": "assert(!(Bear.prototype.hasOwnProperty('eat')), '<code>Bear.prototype</code> should not have the <code>eat</code> property.')"
|
||||
"text": "<code>Bear.prototype</code> should not have the <code>eat</code> property.",
|
||||
"testString": "assert(!(Bear.prototype.hasOwnProperty('eat')), '<code>Bear.prototype</code> should not have the <code>eat</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Cat.prototype</code> should not have the <code>eat</code> property.'",
|
||||
"testString": "assert(!(Cat.prototype.hasOwnProperty('eat')), '<code>Cat.prototype</code> should not have the <code>eat</code> property.')"
|
||||
"text": "<code>Cat.prototype</code> should not have the <code>eat</code> property.",
|
||||
"testString": "assert(!(Cat.prototype.hasOwnProperty('eat')), '<code>Cat.prototype</code> should not have the <code>eat</code> property.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -948,20 +948,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>duck</code> variable should be defined.'",
|
||||
"testString": "assert(typeof duck !== \"undefined\", 'The <code>duck</code> variable should be defined.')"
|
||||
"text": "The <code>duck</code> variable should be defined.",
|
||||
"testString": "assert(typeof duck !== \"undefined\", 'The <code>duck</code> variable should be defined.');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>beagle</code> variable should be defined.'",
|
||||
"testString": "assert(typeof beagle !== \"undefined\", 'The <code>beagle</code> variable should be defined.')"
|
||||
"text": "The <code>beagle</code> variable should be defined.",
|
||||
"testString": "assert(typeof beagle !== \"undefined\", 'The <code>beagle</code> variable should be defined.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.'",
|
||||
"testString": "assert(duck instanceof Animal, '<code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.')"
|
||||
"text": "<code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.",
|
||||
"testString": "assert(duck instanceof Animal, '<code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>beagle</code> should have a <code>prototype</code> of <code>Animal</code>.'",
|
||||
"testString": "assert(beagle instanceof Animal, '<code>beagle</code> should have a <code>prototype</code> of <code>Animal</code>.')"
|
||||
"text": "<code>beagle</code> should have a <code>prototype</code> of <code>Animal</code>.",
|
||||
"testString": "assert(beagle instanceof Animal, '<code>beagle</code> should have a <code>prototype</code> of <code>Animal</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1015,8 +1015,8 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should be an instance of <code>Animal</code>.'",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Dog.prototype), '<code>Dog.prototype</code> should be an instance of <code>Animal</code>.')"
|
||||
"text": "<code>Dog.prototype</code> should be an instance of <code>Animal</code>.",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Dog.prototype), '<code>Dog.prototype</code> should be an instance of <code>Animal</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1069,20 +1069,20 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Bird.prototype</code> should be an instance of <code>Animal</code>.'",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Bird.prototype), '<code>Bird.prototype</code> should be an instance of <code>Animal</code>.')"
|
||||
"text": "<code>Bird.prototype</code> should be an instance of <code>Animal</code>.",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Bird.prototype), '<code>Bird.prototype</code> should be an instance of <code>Animal</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>duck.constructor</code> should return <code>Bird</code>.'",
|
||||
"testString": "assert(duck.constructor === Bird, '<code>duck.constructor</code> should return <code>Bird</code>.')"
|
||||
"text": "<code>duck.constructor</code> should return <code>Bird</code>.",
|
||||
"testString": "assert(duck.constructor === Bird, '<code>duck.constructor</code> should return <code>Bird</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog.prototype</code> should be an instance of <code>Animal</code>.'",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Dog.prototype), '<code>Dog.prototype</code> should be an instance of <code>Animal</code>.')"
|
||||
"text": "<code>Dog.prototype</code> should be an instance of <code>Animal</code>.",
|
||||
"testString": "assert(Animal.prototype.isPrototypeOf(Dog.prototype), '<code>Dog.prototype</code> should be an instance of <code>Animal</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>beagle.constructor</code> should return <code>Dog</code>.'",
|
||||
"testString": "assert(beagle.constructor === Dog, '<code>beagle.constructor</code> should return <code>Dog</code>.')"
|
||||
"text": "<code>beagle.constructor</code> should return <code>Dog</code>.",
|
||||
"testString": "assert(beagle.constructor === Dog, '<code>beagle.constructor</code> should return <code>Dog</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1134,24 +1134,24 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>Animal</code> should not respond to the <code>bark()</code> method.'",
|
||||
"testString": "assert(typeof Animal.prototype.bark == \"undefined\", '<code>Animal</code> should not respond to the <code>bark()</code> method.')"
|
||||
"text": "<code>Animal</code> should not respond to the <code>bark()</code> method.",
|
||||
"testString": "assert(typeof Animal.prototype.bark == \"undefined\", '<code>Animal</code> should not respond to the <code>bark()</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should inherit the <code>eat()</code> method from <code>Animal</code>.'",
|
||||
"testString": "assert(typeof Dog.prototype.eat == \"function\", '<code>Dog</code> should inherit the <code>eat()</code> method from <code>Animal</code>.')"
|
||||
"text": "<code>Dog</code> should inherit the <code>eat()</code> method from <code>Animal</code>.",
|
||||
"testString": "assert(typeof Dog.prototype.eat == \"function\", '<code>Dog</code> should inherit the <code>eat()</code> method from <code>Animal</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>Dog</code> should have the <code>bark()</code> method as an <code>own</code> property.'",
|
||||
"testString": "assert(Dog.prototype.hasOwnProperty('bark'), '<code>Dog</code> should have the <code>bark()</code> method as an <code>own</code> property.')"
|
||||
"text": "<code>Dog</code> should have the <code>bark()</code> method as an <code>own</code> property.",
|
||||
"testString": "assert(Dog.prototype.hasOwnProperty('bark'), '<code>Dog</code> should have the <code>bark()</code> method as an <code>own</code> property.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>beagle</code> should be an <code>instanceof</code> <code>Animal</code>.'",
|
||||
"testString": "assert(beagle instanceof Animal, '<code>beagle</code> should be an <code>instanceof</code> <code>Animal</code>.')"
|
||||
"text": "<code>beagle</code> should be an <code>instanceof</code> <code>Animal</code>.",
|
||||
"testString": "assert(beagle instanceof Animal, '<code>beagle</code> should be an <code>instanceof</code> <code>Animal</code>.');"
|
||||
},
|
||||
{
|
||||
"text": "The constructor for <code>beagle</code> should be set to <code>Dog</code>.'",
|
||||
"testString": "assert(beagle.constructor === Dog, 'The constructor for <code>beagle</code> should be set to <code>Dog</code>.')"
|
||||
"text": "The constructor for <code>beagle</code> should be set to <code>Dog</code>.",
|
||||
"testString": "assert(beagle.constructor === Dog, 'The constructor for <code>beagle</code> should be set to <code>Dog</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1213,12 +1213,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>penguin.fly()</code> should return the string \"Alas, this is a flightless bird.\"'",
|
||||
"testString": "assert(penguin.fly() === \"Alas, '<code>penguin.fly()</code> should return the string \"Alas, this is a flightless bird.\"')"
|
||||
"text": "<code>penguin.fly()</code> should return the string \"Alas, this is a flightless bird.\"",
|
||||
"testString": "assert(penguin.fly() === \"Alas, this is a flightless bird.\", '<code>penguin.fly()</code> should return the string \"Alas, this is a flightless bird.\"');"
|
||||
},
|
||||
{
|
||||
"text": "The <code>bird.fly()</code> method should return \"I am flying!\"'",
|
||||
"testString": "assert((new Bird()).fly() === \"I am flying!\", 'The <code>bird.fly()</code> method should return \"I am flying!\"')"
|
||||
"text": "The <code>bird.fly()</code> method should return \"I am flying!\"",
|
||||
"testString": "assert((new Bird()).fly() === \"I am flying!\", 'The <code>bird.fly()</code> method should return \"I am flying!\"');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1274,16 +1274,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "Your code should declare a <code>glideMixin</code> variable that is a function.'",
|
||||
"testString": "assert(typeof glideMixin === \"function\", 'Your code should declare a <code>glideMixin</code> variable that is a function.')"
|
||||
"text": "Your code should declare a <code>glideMixin</code> variable that is a function.",
|
||||
"testString": "assert(typeof glideMixin === \"function\", 'Your code should declare a <code>glideMixin</code> variable that is a function.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>glideMixin</code> on the <code>bird</code> object to give it the <code>glide</code> method.'",
|
||||
"testString": "assert(typeof bird.glide === \"function\", 'Your code should use the <code>glideMixin</code> on the <code>bird</code> object to give it the <code>glide</code> method.')"
|
||||
"text": "Your code should use the <code>glideMixin</code> on the <code>bird</code> object to give it the <code>glide</code> method.",
|
||||
"testString": "assert(typeof bird.glide === \"function\", 'Your code should use the <code>glideMixin</code> on the <code>bird</code> object to give it the <code>glide</code> method.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should use the <code>glideMixin</code> on the <code>boat</code> object to give it the <code>glide</code> method.'",
|
||||
"testString": "assert(typeof boat.glide === \"function\", 'Your code should use the <code>glideMixin</code> on the <code>boat</code> object to give it the <code>glide</code> method.')"
|
||||
"text": "Your code should use the <code>glideMixin</code> on the <code>boat</code> object to give it the <code>glide</code> method.",
|
||||
"testString": "assert(typeof boat.glide === \"function\", 'Your code should use the <code>glideMixin</code> on the <code>boat</code> object to give it the <code>glide</code> method.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1338,12 +1338,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The <code>weight</code> property should be a private variable.'",
|
||||
"testString": "assert(!code.match(/this\\.weight/g), 'The <code>weight</code> property should be a private variable.')"
|
||||
"text": "The <code>weight</code> property should be a private variable.",
|
||||
"testString": "assert(!code.match(/this\\.weight/g), 'The <code>weight</code> property should be a private variable.');"
|
||||
},
|
||||
{
|
||||
"text": "Your code should create a method in <code>Bird</code> called <code>getWeight</code> that returns the <code>weight</code>.'",
|
||||
"testString": "assert((new Bird()).getWeight() === 15, 'Your code should create a method in <code>Bird</code> called <code>getWeight</code> that returns the <code>weight</code>.')"
|
||||
"text": "Your code should create a method in <code>Bird</code> called <code>getWeight</code> that returns the <code>weight</code>.",
|
||||
"testString": "assert((new Bird()).getWeight() === 15, 'Your code should create a method in <code>Bird</code> called <code>getWeight</code> that returns the <code>weight</code>.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1384,12 +1384,12 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "The function should be anonymous.'",
|
||||
"testString": "assert(/\\(\\s*?function\\s*?\\(\\s*?\\)\\s*?{/.test(code), 'The function should be anonymous.')"
|
||||
"text": "The function should be anonymous.",
|
||||
"testString": "assert(/\\(\\s*?function\\s*?\\(\\s*?\\)\\s*?{/.test(code), 'The function should be anonymous.');"
|
||||
},
|
||||
{
|
||||
"text": "Your function should have parentheses at the end of the expression to call it immediately.'",
|
||||
"testString": "assert(/}\\s*?\\)\\s*?\\(\\s*?\\)/.test(code), 'Your function should have parentheses at the end of the expression to call it immediately.')"
|
||||
"text": "Your function should have parentheses at the end of the expression to call it immediately.",
|
||||
"testString": "assert(/}\\s*?\\)\\s*?\\(\\s*?\\)/.test(code), 'Your function should have parentheses at the end of the expression to call it immediately.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
@ -1433,16 +1433,16 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"text": "<code>funModule</code> should be defined and return an object.'",
|
||||
"testString": "assert(typeof funModule === \"object\", '<code>funModule</code> should be defined and return an object.')"
|
||||
"text": "<code>funModule</code> should be defined and return an object.",
|
||||
"testString": "assert(typeof funModule === \"object\", '<code>funModule</code> should be defined and return an object.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>funModule.isCuteMixin</code> should access a function.'",
|
||||
"testString": "assert(typeof funModule.isCuteMixin === \"function\", '<code>funModule.isCuteMixin</code> should access a function.')"
|
||||
"text": "<code>funModule.isCuteMixin</code> should access a function.",
|
||||
"testString": "assert(typeof funModule.isCuteMixin === \"function\", '<code>funModule.isCuteMixin</code> should access a function.');"
|
||||
},
|
||||
{
|
||||
"text": "<code>funModule.singMixin</code> should access a function.'",
|
||||
"testString": "assert(typeof funModule.singMixin === \"function\", '<code>funModule.singMixin</code> should access a function.')"
|
||||
"text": "<code>funModule.singMixin</code> should access a function.",
|
||||
"testString": "assert(typeof funModule.singMixin === \"function\", '<code>funModule.singMixin</code> should access a function.');"
|
||||
}
|
||||
],
|
||||
"solutions": [
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user