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

Tell us what’s happening:
Why Isn’t It Accepting this code?

      assert.isNull(null, 'This is an optional error description - e.g. null is null');
      assert.isNotNull(1, '1 is not null');

Your project link(s)

solution: https://replit.com/@ericdominguez/actual-legit-things

Your browser information:

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

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

Link to the challenge:

The functional tests on Replit are crashing the server. You can restart it by adding an after function to the bottom of the last tests in 2_functional-tests.js

after(function() {
  chai.request(server)
    .get('/')
});

Now I’m getting this error


All tests should pass. You should choose the correct method for the first assertion -

isNull


vs.

isNotNull


. You should choose the correct method for the second assertion -

isNull


vs.

isNotNull


. // tests completed // console output [Error] [Error] [Error]

If I fork your code and run it, it passes the null tests for me.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.