Quality Assurance and Testing with Chai - Learn How JavaScript Assertions Work

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)

solution: boilerplate-mochachai-1 - Node.js Repl - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Quality Assurance and Testing with Chai - Learn How JavaScript Assertions Work

Link to the challenge:

… change each assert to either assert.isNull or assert.isNotNull to make the test pass (should evaluate to true ). Do not alter the arguments passed to the asserts.

In JavaScript there is a data type call null and it means that lack of a value (refer your course notes from the beginning JS lessons).

Here you are testing to see (or checking or asserting) if something is a null value or is not a null value. This test #1, wants you use the assert.isNull or assert.isNotNull for this testing.

For example, when null is equal to null then the test is true. Is the number 10 or a string “Hello” null values? They are not.

1 Like