fix(cirriculum): Expand instructions for Chai Assertion challenges (#35724)

* Expand instructions for Chai Assertion challenges

* Seperate instructions/descriptions and remove some quotes

* Add detail to descriptions in truthiness and isOk challenges

* Update formatting in instructions
pull/32363/head
ranched 2019-04-19 08:04:53 -05:00 committed by The Coding Aviator
parent 1f7a1a6e1f
commit 9899035f34
16 changed files with 36 additions and 24 deletions

View File

@ -7,12 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.deepEqual()</code>, <code>.notDeepEqual()</code>.
<code>.deepEqual()</code> asserts that two object are deep equal.
<code>deepEqual()</code> asserts that two object are deep equal.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.deepEqual()</code> or <code>assert.notDeepEqual()</code> to make the tests pass.
</section>

View File

@ -7,12 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.isAbove() => a > b</code> , <code>.isAtMost() => a <= b</code>.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.isAbove()</code>(i.e. greater) or <code>assert.isAtMost()</code> (i.e. less than or equal) to make the tests pass.
</section>
## Tests

View File

@ -8,13 +8,19 @@ challengeType: 2
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>isTrue()</code> will test for the boolean value true and <code>isNotTrue()</code> will pass when given anything but the boolean value of true.
<blockquote>
assert.isTrue(true, 'this will pass with the boolean value true');
assert.isTrue('true', 'this will NOT pass with the string value 'true');
assert.isTrue(1, 'this will NOT pass with the number value 1');
</blockquote>
<code>isFalse()</code> and <code>isNotFalse()</code> also exist and behave similary to their true counterparts except they look for the boolean value of false.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.isTrue()</code> or <code>assert.isNotTrue()</code> to make the tests pass.
<code>.isTrue(true)</code> and <code>.isNotTrue(everything else)</code> will pass.
<code>.isFalse()</code> and <code>.isNotFalse()</code> also exist.
</section>
## Tests

View File

@ -7,12 +7,15 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>#include (or #notInclude)</code> works for strings too!!
It asserts that the actual string contains the expected substring.
<code>include()</code> and <code>notInclude()</code> work for strings too!
<code>include()</code> asserts that the actual string contains the expected substring.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.include()</code> or <code>assert.notInclude()</code> to make the tests pass.
</section>

View File

@ -8,13 +8,13 @@ challengeType: 2
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.approximately(actual, expected, delta, [message])</code>
Asserts that the actual is equal <code>expected</code>, to within a +/- <code>delta</code> range.
</section>
## Instructions
<section id='instructions'>
<code>.approximately</code>
<code>.approximately(actual, expected, range, [message])</code>
<code>actual = expected +/- range</code>
Use <code>assert.approximately()</code> to make the tests pass.
Choose the minimum range (3rd parameter) to make the test always pass. It should be less than 1.
</section>

View File

@ -7,12 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>#isString</code> or <code>#isNotString</code> asserts that the actual value is a string.
<code>isString</code> or <code>isNotString</code> asserts that the actual value is a string.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.isString()</code> or <code>assert.isNotString()</code> to make the tests pass.
</section>
## Tests

View File

@ -11,7 +11,7 @@ As a reminder, this project is being built upon the following starter project on
## Instructions
<section id='instructions'>
Use <code>assert.isArray()</code> or <code>assert.isNotArray()</code> to make the tests pass.
</section>
## Tests

View File

@ -13,7 +13,7 @@ As a reminder, this project is being built upon the following starter project on
## Instructions
<section id='instructions'>
Use <code>#typeOf</code> or <code>#notTypeOf</code> where it is appropriate.
Use <code>assert.typeOf()</code> or <code>assert.notTypeOf()</code> to make the tests pass.
</section>
## Tests

View File

@ -11,7 +11,7 @@ As a reminder, this project is being built upon the following starter project on
## Instructions
<section id='instructions'>
Use <code>assert.include()</code> or <code>assert.notInclude()</code> to make the tests pass.
</section>
## Tests

View File

@ -13,7 +13,7 @@ As a reminder, this project is being built upon the following starter project on
## Instructions
<section id='instructions'>
Use <code>#property</code> or <code>#notProperty</code> where it is appropriate.
Use <code>assert.property()</code> or <code>assert.notProperty()</code> to make the tests pass.
</section>
## Tests

View File

@ -13,7 +13,7 @@ As a reminder, this project is being built upon the following starter project on
## Instructions
<section id='instructions'>
Use <code>#instanceOf</code> or <code>#notInstanceOf</code> where it is appropriate.
Use <code>assert.instanceOf()</code> or <code>assert.notInstanceOf()</code> to make the tests pass.
</section>
## Tests

View File

@ -7,11 +7,11 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.isBelow() => a < b</code> , <code>.isAtLeast => a >= b</code>.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.isBelow()</code> (i.e. less than) or <code>assert.isAtLeast()</code> (i.e. greater than or equal) to make the tests pass.
</section>

View File

@ -8,12 +8,14 @@ challengeType: 2
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>isOk()</code> will test for a truthy value and <code>isNotOk()</code> will test for a falsy value.
Truthy reference: https://developer.mozilla.org/en-US/docs/Glossary/Truthy
Falsy reference: https://developer.mozilla.org/en-US/docs/Glossary/Falsy
</section>
## Instructions
<section id='instructions'>
Use <code>assert.isOk()</code> or <code>assert.isNotOk()</code> to make the tests pass.
<code>.isOk(truthy)</code> and <code>.isNotOk(falsey)</code> will pass.
</section>
## Tests

View File

@ -7,11 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>#match</code> asserts that the actual value matches the second argument regular expression.
<code>match()</code> asserts that the actual value matches the second argument regular expression.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.match()</code> to make the tests pass.
</section>

View File

@ -7,12 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.equal()</code>, <code>.notEqual()</code>.
<code>.equal()</code> compares objects using <code>'=='</code>.
<code>equal()</code> compares objects using <code>==</code>.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.equal()</code> or <code>assert.notEqual()</code> to make the tests pass.
</section>

View File

@ -7,12 +7,12 @@ challengeType: 2
## Description
<section id='description'>
As a reminder, this project is being built upon the following starter project on <a href='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <a href='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
<code>.strictEqual()</code>, <code>.notStrictEqual()</code>.
<code>.strictEqual()</code> compares objects using <code>'==='</code>.
<code>strictEqual()</code> compares objects using <code>===</code>.
</section>
## Instructions
<section id='instructions'>
Use <code>assert.strictEqual()</code> or <code>assert.notStrictEqual()</code> to make the tests pass.
</section>