` containing the info returned by the call to the DOM. Here is an example of how to interact with this form:
+
+```js
+test('#test - submit the input "surname" : "Polo"', function (done) {
+ browser.fill('surname', 'Polo').pressButton('submit', function () {
+ browser.assert.success();
+ browser.assert.text('span#name', 'Marco');
+ browser.assert.text('span#surname', 'Polo');
+ browser.assert.element('span#dates', 1);
+ done();
+ });
+}
+```
+
+First, the `fill` method of the `browser` object fills the `surname` field of the form with the value `'Polo'`. Immediately after, the `pressButton` method invokes the `submit` event listener of the form. The `pressButton` method is asynchronous.
+
+Then, once a response is received from the AJAX request, a few assertions are made confirming:
+
+1. The status of the response is `200`
+2. The text within the `
` element matches `'Marco'`
+3. The text within the `
` element matches `'Polo'`
+4. The there is `1` `
` element.
+
+Finally, the `done` callback is invoked, which is needed due to the asynchronous test.
+
## Instructions
+
-This exercise is similar to the preceding one.
-Look at the code for directions. Follow the assertions order: we rely on it.
+
+Within `tests/2_functional-tests.js`, in the `'submit "surname" : "Colombo" - write your e2e test...'` test (`// #5`), automate filling-in and submitting the form:
+
+1. Fill in the form
+2. Submit it pressing `'submit'` button.
+
+Within the callback:
+
+1. assert that status is OK `200`
+2. assert that the text inside the element `span#name` is `'Cristoforo'`
+3. assert that the text inside the element `span#surname` is `'Colombo'`
+4. assert that the element(s) `span#dates` exist and their count is `1`
+
+Do not forget to to remove the `assert.fail()` call.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should assert that the headless browser request succeeded.
+ - text: You should assert that the headless browser request succeeded.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[0].method, 'browser.success'); }, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the text inside the element 'span#name' is 'Amerigo'.
- testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[1].method, 'browser.text'); assert.match(data.assertions[1].args[0], /('|")span#name\1/); assert.match(data.assertions[1].args[1], /('|")Amerigo\1/);}, xhr => { throw new Error(xhr.responseText); })
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[1].method, 'browser.text'); assert.match(data.assertions[1].args[0], /('|")span#name\1/); assert.match(data.assertions[1].args[1], /('|")Cristoforo\1/);}, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the text inside the element 'span#surname' is 'Vespucci'.
- testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[2].method, 'browser.text'); assert.match(data.assertions[2].args[0], /('|")span#surname\1/); assert.match(data.assertions[2].args[1], /('|")Vespucci\1/);}, xhr => { throw new Error(xhr.responseText); })
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[2].method, 'browser.text'); assert.match(data.assertions[2].args[0], /('|")span#surname\1/); assert.match(data.assertions[2].args[1], /('|")Colombo\1/);}, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the element 'span#dates' exist and its count is 1.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=5').then(data => { assert.equal(data.assertions[3].method, 'browser.element'); assert.match(data.assertions[3].args[0], /('|")span#dates\1/); assert.equal(data.assertions[3].args[1], 1);}, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser.md
index f8b12482b9..8129555b46 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser.md
@@ -6,20 +6,57 @@ forumTopicId: 301595
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
+
In the next challenges we are going to simulate the human interaction with a page using a device called 'Headless Browser'.
+
A headless browser is a web browser without a graphical user interface. This kind of tool is particularly useful for testing web pages, as it is able to render and understand HTML, CSS, and JavaScript the same way a browser would.
+For these challenges we are using Zombie.JS. It's a lightweight browser which is totally based on JS, without relying on additional binaries to be installed. This feature makes it usable in an environment such as Repl.it. There are many other (more powerful) options.
+
+Mocha allows You to prepare the ground running some code before the actual tests. This can be useful for example to create items in the database, which will be used in the successive tests.
+
+With a headless browser, before the actual testing, we need to **visit** the page we are going to inspect. The `suiteSetup` 'hook' is executed only once at the suite startup. Other different hook types can be executed before each test, after each test, or at the end of a suite. See the Mocha docs for more information.
+
## Instructions
+
-For these challenges we are using Zombie.JS. It's a lightweight browser which is totally based on JS, without relying on additional binaries to be installed. This feature makes it usable in an environment such as Repl.it. There are many other (more powerful) options.
-Look at the examples in the code for the exercise directions Follow the assertions order, We rely on it.
+
+Within `tests/2_functional-tests.js`, immediately after the `Browser` declaration, add your project URL to the `site` property of the variable:
+
+```js
+Browser.site = 'https://sincere-cone.gomix.me'; // Your URL here
+```
+
+If you are testing on a local environment replace the line above with
+
+```js
+Browser.localhost('example.com', process.env.PORT || 3000);
+```
+
+Within `tests/2_functional-tests.js`, at the root level of the `'e2e Testing with Zombie.js'` suite, instantiate a new instance of the `Browser` object with the following code:
+
+```js
+const browser = new Browser();
+```
+
+Then, use the `suiteSetup` hook to direct the `browser` to the `/` route with the following code:
+
+```js
+suiteSetup(function(done) {
+ return browser.visit('/', done);
+});
+```
+
## Tests
+
```yml
@@ -29,22 +66,23 @@ tests:
- text: You should assert that the headless browser request succeeded.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[0].method, 'browser.success'); }, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the text inside the element 'span#name' is 'Cristoforo'.
- testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[1].method, 'browser.text'); assert.match(data.assertions[1].args[0], /('|")span#name\1/); assert.match(data.assertions[1].args[1], /('|")Cristoforo\1/);}, xhr => { throw new Error(xhr.responseText); })
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[1].method, 'browser.text'); assert.match(data.assertions[1].args[0], /('|")span#name\1/); assert.match(data.assertions[1].args[1], /('|")Marco\1/);}, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the text inside the element 'span#surname' is 'Colombo'.
- testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[2].method, 'browser.text'); assert.match(data.assertions[2].args[0], /('|")span#surname\1/); assert.match(data.assertions[2].args[1], /('|")Colombo\1/);}, xhr => { throw new Error(xhr.responseText); })
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[2].method, 'browser.text'); assert.match(data.assertions[2].args[0], /('|")span#surname\1/); assert.match(data.assertions[2].args[1], /('|")Polo\1/);}, xhr => { throw new Error(xhr.responseText); })
- text: You should assert that the element 'span#dates' exist and its count is 1.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=4').then(data => { assert.equal(data.assertions[3].method, 'browser.element'); assert.match(data.assertions[3].args[0], /('|")span#dates\1/); assert.equal(data.assertions[3].args[1], 1);}, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md
new file mode 100644
index 0000000000..9dd5fef017
--- /dev/null
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md
@@ -0,0 +1,73 @@
+---
+id: 5f8884f4c46685731aabfc41
+title: Simulate Actions Using a Headless Browser
+challengeType: 2
+---
+
+## Description
+
+
+
+As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
+
+
+
+## Instructions
+
+
+
+Within `tests/2_functional-tests.js`, in the `'submit "surname" : "Vespucci" - write your e2e test...'` test (`// #6`), automate filling-in and submitting the form from scratch:
+
+1. Fill in the form with the `surname` of `Vespucci`
+2. Submit it pressing `'submit'` button
+
+Within the callback:
+
+1. assert that status is `200`
+2. assert that the text inside the element `span#name` is `'Amerigo'`
+3. assert that the text inside the element `span#surname` is `'Vespucci'`
+4. assert that the element(s) `span#dates` exist and their count is `1`
+
+Do not forget to to remove the `assert.fail()` call.
+
+
+
+## Tests
+
+
+
+```yml
+tests:
+ - text: All tests should pass.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=6').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
+ - text: You should assert that the headless browser request succeeded.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=6').then(data => { assert.equal(data.assertions[0].method, 'browser.success'); }, xhr => { throw new Error(xhr.responseText); })
+ - text: You should assert that the text inside the element 'span#name' is 'Amerigo'.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=6').then(data => { assert.equal(data.assertions[1].method, 'browser.text'); assert.match(data.assertions[1].args[0], /('|")span#name\1/); assert.match(data.assertions[1].args[1], /('|")Amerigo\1/);}, xhr => { throw new Error(xhr.responseText); })
+ - text: You should assert that the text inside the element 'span#surname' is 'Vespucci'.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=6').then(data => { assert.equal(data.assertions[2].method, 'browser.text'); assert.match(data.assertions[2].args[0], /('|")span#surname\1/); assert.match(data.assertions[2].args[1], /('|")Vespucci\1/);}, xhr => { throw new Error(xhr.responseText); })
+ - text: You should assert that the element 'span#dates' exist and its count is 1.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=functional&n=6').then(data => { assert.equal(data.assertions[3].method, 'browser.element'); assert.match(data.assertions[3].args[0], /('|")span#dates\1/); assert.equal(data.assertions[3].args[1], 1);}, xhr => { throw new Error(xhr.responseText); })
+```
+
+
+
+## Challenge Seed
+
+
+
+## Solution
+
+
+
+```js
+/**
+ Backend challenges don't need solutions,
+ because they would need to be tested against a full working project.
+ Please check our contributing guidelines to learn more.
+*/
+```
+
+
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
index bd5793709c..fe3b0dd104 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
@@ -6,10 +6,12 @@ forumTopicId: 301596
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-isTrue()
will test for the boolean value true
and isNotTrue()
will pass when given anything but the boolean value of true
.
+`isTrue()` will test for the boolean value `true` and `isNotTrue()` will pass when given anything but the boolean value of `true`.
```js
assert.isTrue(true, 'this will pass with the boolean value true');
@@ -17,39 +19,44 @@ assert.isTrue('true', 'this will NOT pass with the string value 'true');
assert.isTrue(1, 'this will NOT pass with the number value 1');
```
+`isFalse()` and `isNotFalse()` also exist, and behave similarly to their true counterparts except they look for the boolean value of `false`.
-isFalse()
and isNotFalse()
also exist and behave similarly to their true counterparts except they look for the boolean value of false
.
## Instructions
+
-Use assert.isTrue()
or assert.isNotTrue()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#4` in the `Basic Assertions` suite, change each `assert` to either `assert.isTrue` or `assert.isNotTrue` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isTrue vs. isNotTrue.
+ - text: You should choose the correct method for the first assertion - `isTrue` vs. `isNotTrue`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(data => { assert.equal(data.assertions[0].method, 'isTrue', 'True is true'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isTrue vs. isNotTrue.
+ - text: You should choose the correct method for the second assertion - `isTrue` vs. `isNotTrue`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(data => { assert.equal(data.assertions[1].method, 'isTrue', 'Double negation of a truthy value is true'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isTrue vs. isNotTrue.
+ - text: You should choose the correct method for the third assertion - `isTrue` vs. `isNotTrue`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=3').then(data => { assert.equal(data.assertions[2].method, 'isNotTrue', 'A truthy object is not true - neither is a false one'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
index de171113a9..a8a398e4ff 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
@@ -6,42 +6,48 @@ forumTopicId: 301597
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-include()
and notInclude()
work for strings too!
-include()
asserts that the actual string contains the expected substring.
+`include()` and `notInclude()` work for strings too!
+`include()` asserts that the actual string contains the expected substring.
+
## Instructions
-
-Use assert.include()
or assert.notInclude()
to make the tests pass.
+
+
+Within `tests/1_unit-tests.js` under the test labelled `#14` in the `Strings` suite, change each `assert` to either `assert.include` or `assert.notInclude` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=13').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - include vs. notInclude.
+ - text: You should choose the correct method for the first assertion - `include` vs. `notInclude`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=13').then(data => { assert.equal(data.assertions[0].method, 'include', '\'Arrow\' contains \'row\'...'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - include vs. notInclude.
+ - text: You should choose the correct method for the second assertion - `include` vs. `notInclude`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=13').then(data => { assert.equal(data.assertions[1].method, 'notInclude', '... a \'dart\' doesn\'t contain a \'queue\''); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
index 56972d2e94..2fa431c480 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
@@ -6,41 +6,53 @@ forumTopicId: 301598
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-.approximately(actual, expected, delta, [message])
-Asserts that the actual is equal expected
, to within a +/- delta
range.
+```javascript
+.approximately(actual, expected, delta, [message])
+```
+
+Asserts that the `actual` is equal to `expected`, to within a +/- `delta` range.
+
## Instructions
+
-Use assert.approximately()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#10` in the `Comparisons` suite, change each `assert` to `assert.approximately` to make the test pass (should evaluate to `true`).
+
Choose the minimum range (3rd parameter) to make the test always pass. It should be less than 1.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should use approximately(actual, expected, range) - You should choose the correct range.
+ - text: You should choose the correct range for the first assertion - `approximately(actual, expected, range)`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => { assert.equal(data.assertions[0].method, 'approximately'); assert.equal(data.assertions[0].args[2], 0.5, 'weirdNumbers(0.5) is in the range (0.5, 1.5]. It\'s within 1 +/- 0.5'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should use approximately(actual, expected, range) - You should choose the correct range.
+ - text: You should choose the correct range for the second assertion - `approximately(actual, expected, range)`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=9').then(data => { assert.equal(data.assertions[1].method, 'approximately'); assert.equal(data.assertions[1].args[2], 0.8, 'weirdNumbers(0.2) is in the range (0.2, 1.2]. It\'s within 1 +/- 0.8'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
index a4989e8b76..efc0e5f6b1 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
@@ -6,40 +6,49 @@ forumTopicId: 301599
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-isString
or isNotString
asserts that the actual value is a string.
+
+`isString` or `isNotString` asserts that the actual value is a string.
+
## Instructions
+
-Use assert.isString()
or assert.isNotString()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#13` in the `Strings` suite, change each `assert` to either `assert.isString` or `assert.isNotString` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=12').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isString vs. isNotString.
+ - text: You should choose the correct method for the first assertion - `isString` vs. `isNotString`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=12').then(data => { assert.equal(data.assertions[0].method, 'isNotString', 'A float number is not a string'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isString vs. isNotString.
+ - text: You should choose the correct method for the second assertion - `isString` vs. `isNotString`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=12').then(data => { assert.equal(data.assertions[1].method, 'isString', 'environment vars are strings (or undefined)'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isString vs. isNotString.
+ - text: You should choose the correct method for the third assertion - `isString` vs. `isNotString`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=12').then(data => { assert.equal(data.assertions[2].method, 'isString', 'A JSON is a string'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
index 71f859eea3..ffd173104c 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
@@ -6,37 +6,45 @@ forumTopicId: 301600
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
+
## Instructions
+
-Use assert.isArray()
or assert.isNotArray()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#11` in the `Arrays` suite, change each `assert` to either `assert.isArray` or `assert.isNotArray` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isArray vs. isNotArray.
+ - text: You should choose the correct method for the first assertion - `isArray` vs. `isNotArray`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => { assert.equal(data.assertions[0].method, 'isArray', 'String.prototype.split() returns an Array'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isArray vs. isNotArray.
+ - text: You should choose the correct method for the second assertion - `isArray` vs. `isNotArray`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10').then(data => { assert.equal(data.assertions[1].method, 'isNotArray', 'Array.prototype.indexOf() returns a number'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
index fe702fd6c0..f3d27ef7a1 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
@@ -6,45 +6,53 @@ forumTopicId: 301601
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-#typeOf
asserts that value’s type is the given string, as determined by Object.prototype.toString
.
+
+`#typeOf` asserts that value's type is the given string, as determined by `Object.prototype.toString`.
## Instructions
+
-Use assert.typeOf()
or assert.notTypeOf()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#17` in the `Objects` suite, change each `assert` to either `assert.typeOf` or `assert.notTypeOf` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - typeOf vs. notTypeOf.
+ - text: You should choose the correct method for the first assertion - `typeOf` vs. `notTypeOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[0].method, 'typeOf', 'myCar is typeOf Object'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - typeOf vs. notTypeOf.
+ - text: You should choose the correct method for the second assertion - `typeOf` vs. `notTypeOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[1].method, 'typeOf', 'Car.model is a String'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - typeOf vs. notTypeOf.
+ - text: You should choose the correct method for the third assertion - `typeOf` vs. `notTypeOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[2].method, 'notTypeOf', 'Plane.wings is a Number (not a String)'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - typeOf vs. notTypeOf.
+ - text: You should choose the correct method for the fourth assertion - `typeOf` vs. `notTypeOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[3].method, 'typeOf', 'Plane.engines is an Array'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - typeOf vs. notTypeOf.
+ - text: You should choose the correct method for the fifth assertion - `typeOf` vs. `notTypeOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=16').then(data => { assert.equal(data.assertions[4].method, 'typeOf', 'Car.wheels is a Number'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
index e0a7c7c276..f99ad5b23d 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
@@ -6,40 +6,47 @@ forumTopicId: 301602
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
## Instructions
+
-Use assert.isDefined()
or assert.isUndefined()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#2` in the `Basic Assertions` suite, change each `assert` to either `assert.isDefined()` or `assert.isUndefined()` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=1').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isDefined vs. isUndefined.
+ - text: You should choose the correct method for the first assertion - `isDefined` vs. `isUndefined`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=1').then(data => { assert.equal(data.assertions[0].method, 'isDefined', 'Null is not undefined'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isDefined vs. isUndefined.
+ - text: You should choose the correct method for the second assertion - `isDefined` vs. `isUndefined`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=1').then(data => { assert.equal(data.assertions[1].method, 'isUndefined', 'Undefined is undefined'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isDefined vs. isUndefined.
+ - text: You should choose the correct method for the third assertion - `isDefined` vs. `isUndefined`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=1').then(data => { assert.equal(data.assertions[2].method, 'isDefined', 'A string is not undefined'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
index 10477d0871..d49d9014e6 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
@@ -6,37 +6,45 @@ forumTopicId: 301603
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
+
## Instructions
+
-Use assert.include()
or assert.notInclude()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#12` in the `Arrays` suite, change each `assert` to either `assert.include` or `assert.notInclude` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=11').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - include vs. notInclude.
+ - text: You should choose the correct method for the first assertion - `include` vs. `notInclude`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=11').then(data => { assert.equal(data.assertions[0].method, 'notInclude', 'It\'s summer in july...'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - include vs. notInclude.
+ - text: You should choose the correct method for the second assertion - `include` vs. `notInclude`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=11').then(data => { assert.equal(data.assertions[1].method, 'include', 'JavaScript is a backend language !!'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
index 060cc415bd..9b51d19ff7 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
@@ -6,41 +6,49 @@ forumTopicId: 301604
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-property
asserts that the actual object has a given property.
+
+`property` asserts that the actual object has a given property.
## Instructions
+
-Use assert.property()
or assert.notProperty()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#16` in the `Objects` suite, change each `assert` to either `assert.property` or `assert.notProperty` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=15').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - property vs. notProperty.
+ - text: You should choose the correct method for the first assertion - `property` vs. `notProperty`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=15').then(data => { assert.equal(data.assertions[0].method, 'notProperty', 'A car has not wings'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - property vs. notProperty.
+ - text: You should choose the correct method for the second assertion - `property` vs. `notProperty`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=15').then(data => { assert.equal(data.assertions[1].method, 'property', 'planes have engines'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - property vs. notProperty.
+ - text: You should choose the correct method for the third assertion - `property` vs. `notProperty`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=15').then(data => { assert.equal(data.assertions[2].method, 'property', 'Cars have wheels'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
index d8234916f4..28a9daf3fd 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
@@ -6,43 +6,51 @@ forumTopicId: 301605
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-#instanceOf
asserts that an object is an instance of a constructor.
+
+`#instanceOf` asserts that an object is an instance of a constructor.
## Instructions
+
-Use assert.instanceOf()
or assert.notInstanceOf()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#18` in the `Objects` suite, change each `assert` to either `assert.instanceOf` or `assert.notInstanceOf` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=17').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - instanceOf vs. notInstanceOf.
+ - text: You should choose the correct method for the first assertion - `instanceOf` vs. `notInstanceOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=17').then(data => { assert.equal(data.assertions[0].method, 'notInstanceOf', 'myCar is not an instance of Plane'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - instanceOf vs. notInstanceOf.
+ - text: You should choose the correct method for the second assertion - `instanceOf` vs. `notInstanceOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=17').then(data => { assert.equal(data.assertions[1].method, 'instanceOf', 'airlinePlane is an instance of Plane'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - instanceOf vs. notInstanceOf.
+ - text: You should choose the correct method for the third assertion - `instanceOf` vs. `notInstanceOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=17').then(data => { assert.equal(data.assertions[2].method, 'instanceOf', 'everything is an Object in JavaScript...'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - instanceOf vs. notInstanceOf.
+ - text: You should choose the correct method for the fourth assertion - `instanceOf` vs. `notInstanceOf`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=17').then(data => { assert.equal(data.assertions[3].method, 'notInstanceOf', 'myCar.wheels is not an instance of String'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
index 395eb5ebce..59dab0d936 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
@@ -6,42 +6,49 @@ forumTopicId: 301606
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
+
## Instructions
+
-Use assert.isBelow()
(i.e. less than) or assert.isAtLeast()
(i.e. greater than or equal) to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#9` in the `Comparisons` suite, change each `assert` to either `assert.isBelow` or `assert.isAtLeast` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=8').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isBelow vs. isAtLeast.
+ - text: You should choose the correct method for the first assertion - `isBelow` vs. `isAtLeast`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=8').then(data => { assert.equal(data.assertions[0].method, 'isAtLeast', '5 is at least (>=) 5'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isBelow vs. isAtLeast.
+ - text: You should choose the correct method for the second assertion - `isBelow` vs. `isAtLeast`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=8').then(data => { assert.equal(data.assertions[1].method, 'isAtLeast', '2 * Math.random() is at least 0'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isBelow vs. isAtLeast.
+ - text: You should choose the correct method for the third assertion - `isBelow` vs. `isAtLeast`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=8').then(data => { assert.equal(data.assertions[2].method, 'isBelow', '1 is smaller than 2'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isBelow vs. isAtLeast.
+ - text: You should choose the correct method for the fourth assertion - `isBelow` vs. `isAtLeast`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=8').then(data => { assert.equal(data.assertions[3].method, 'isBelow', '2/3 (0.6666) is smaller than 1'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
index 407a7805e6..ced5a1552c 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
@@ -6,44 +6,51 @@ forumTopicId: 301607
---
## Description
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-isOk()
will test for a truthy value and isNotOk()
will test for a falsy value.
+`isOk()` will test for a truthy value, and `isNotOk()` will test for a falsy value.
+
To learn more about truthy and falsy values, try our Falsy Bouncer challenge.
+
## Instructions
+
-Use assert.isOk()
or assert.isNotOk()
to make the tests pass.
+Within `tests/1_unit-tests.js` under the test labelled `#3` in the `Basic Assertions` suite, change each `assert` to either `assert.isOk()` or `assert.isNotOk()` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=2').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isOk vs. isNotOk.
+ - text: You should choose the correct method for the first assertion - `isOk` vs. `isNotOk`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=2').then(data => { assert.equal(data.assertions[0].method, 'isNotOk', 'Null is falsy'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isOk vs. isNotOk.
+ - text: You should choose the correct method for the second assertion - `isOk` vs. `isNotOk`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=2').then(data => { assert.equal(data.assertions[1].method, 'isOk','A string is truthy'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - isOk vs. isNotOk.
+ - text: You should choose the correct method for the third assertion - `isOk` vs. `isNotOk`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=2').then(data => { assert.equal(data.assertions[2].method, 'isOk', 'true is truthy'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
index 1965a5d14e..f2cec85ee1 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
@@ -6,39 +6,47 @@ forumTopicId: 301608
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-match()
asserts that the actual value matches the second argument regular expression.
+
+`match()` asserts that the actual value matches the second argument regular expression.
+
## Instructions
+
-Use assert.match()
or assert.notMatch()
to make the tests pass.
-
+
+Within `tests/1_unit-tests.js` under the test labelled `#15` in the `Strings` suite, change each `assert` to either `assert.match` or `assert.notMatch` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=14').then(data => { assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - match vs. notMatch.
- testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/get-tests?type=unit&n=14'').then(data => { assert.equal(data.assertions[0].method, ''match'', ''\''# name: John Doe, age: 35\'' matches the regex''); }, xhr => { throw new Error(xhr.responseText); })'
- - text: You should choose the right assertion - match vs. notMatch.
- testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/get-tests?type=unit&n=14'').then(data => { assert.equal(data.assertions[1].method, ''notMatch'', ''\''# name: Paul Smith III, age: twenty-four\'' does not match the regex (the age must be numeric)''); }, xhr => { throw new Error(xhr.responseText); })'
-
+ - text: You should choose the correct method for the first assertion - `match` vs. `notMatch`.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=14').then(data => { assert.equal(data.assertions[0].method, 'match', '\'# name:John Doe, age:35\' matches the regex'); }, xhr => { throw new Error(xhr.responseText); })
+ - text: You should choose the correct method for the second assertion - `match` vs. `notMatch`.
+ testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=14').then(data => { assert.equal(data.assertions[1].method, 'notMatch', '\'# name:Paul Smith III, age:twenty-four\' does not match the regex (the age must be numeric)'); }, xhr => { throw new Error(xhr.responseText); })
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
index 582539b9cd..f3cb08c70a 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
@@ -6,43 +6,51 @@ forumTopicId: 301609
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-equal()
compares objects using ==
.
+
+`equal()` compares objects using `==`.
+
## Instructions
+
-Use assert.equal()
or assert.notEqual()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#5` in the `Equality` suite, change each `assert` to either `assert.equal` or `assert.notEqual` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=4').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - equal vs. notEqual.
+ - text: You should choose the correct method for the first assertion - `equal` vs. `notEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=4').then(data => { assert.equal(data.assertions[0].method, 'equal', 'Numbers are coerced into strings with == '); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - equal vs. notEqual.
+ - text: You should choose the correct method for the second assertion - `equal` vs. `notEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=4').then(data => { assert.equal(data.assertions[1].method, 'notEqual', ' == compares object references'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - equal vs. notEqual.
+ - text: You should choose the correct method for the third assertion - `equal` vs. `notEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=4').then(data => { assert.equal(data.assertions[2].method, 'equal', '6 * \'2\' is 12 ! It should be equal to \'12\''); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - equal vs. notEqual.
+ - text: You should choose the correct method for the fourth assertion - `equal` vs. `notEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=4').then(data => { assert.equal(data.assertions[3].method, 'notEqual', '6 + \'2\' is \'62\'...'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+
```js
diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
index 2551b04bca..d2f7c3ff2f 100644
--- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
+++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
@@ -6,43 +6,51 @@ forumTopicId: 301610
---
## Description
+
+
As a reminder, this project is being built upon the following starter project on Repl.it, or cloned from GitHub.
-strictEqual()
compares objects using ===
.
+
+`strictEqual()` compares objects using `===`.
+
## Instructions
+
-Use assert.strictEqual()
or assert.notStrictEqual()
to make the tests pass.
+
+Within `tests/1_unit-tests.js` under the test labelled `#6` in the `Equality` suite, change each `assert` to either `assert.strictEqual` or `assert.notStrictEqual` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
## Tests
+
```yml
tests:
- text: All tests should pass.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=5').then(data => {assert.equal(data.state,'passed'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - strictEqual vs. notStrictEqual.
+ - text: You should choose the correct method for the first assertion - `strictEqual` vs. `notStrictEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=5').then(data => { assert.equal(data.assertions[0].method, 'notStrictEqual', 'with strictEqual the type must match'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - strictEqual vs. notStrictEqual.
+ - text: You should choose the correct method for the second assertion - `strictEqual` vs. `notStrictEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=5').then(data => { assert.equal(data.assertions[1].method, 'strictEqual', '3*2 = 6...'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - strictEqual vs. notStrictEqual.
+ - text: You should choose the correct method for the third assertion - `strictEqual` vs. `notStrictEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=5').then(data => { assert.equal(data.assertions[2].method, 'strictEqual', '6 * \'2\' is 12. Types match !'); }, xhr => { throw new Error(xhr.responseText); })
- - text: You should choose the right assertion - strictEqual vs. notStrictEqual.
+ - text: You should choose the correct method for the fourth assertion - `strictEqual` vs. `notStrictEqual`.
testString: getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=5').then(data => { assert.equal(data.assertions[3].method, 'notStrictEqual', 'Even if they have the same elements, the Arrays are notStrictEqual'); }, xhr => { throw new Error(xhr.responseText); })
-
```
## Challenge Seed
+
## Solution
+