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

Tell us what’s happening:

I can’t get past lesson 1 of the QA course.

Once I complete what is requested, I add the Gitpod link, click on the complete button, and the output is this:

// running tests
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]

I don’t know if the instructions are unclear, or I’m not understanding something. In Gitpod I see that in the console output all tests fail except #1, but the exercise asks me to only modify #1. It’s a bit confusing.

The errors look like this:

     AssertionError: assert.fail()
      at Context.<anonymous> (tests/1_unit-tests.js:13:14)
      at process.processImmediate (node:internal/timers:478:21)

I would appreciate any help. I want to move forward with this course.

###Your project link(s)

solution:

Your browser information:

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

Challenge Information:

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

My code: https://freecodecam-boilerplate-mowpqn8pdb9.ws-eu108.gitpod.io/

I will leave this here for anyone who may find it helpful. In order for the solution from the first lesson to be passed, I had to do the following:

  • Use the link to start the Gitpod starter project (Dashboard)
  • Make the changes required for test #1 (add the isNull & isNotNull methods)
  • Add a comment (/* */) in other tests, so the only test running is the #1.
  • Copy the link from the browser, that is, the one on the tab titled “Simple Browser”. The URL looks like “https://3000-freecodecam-boilerplate-xxxxxx1xxx2.ws-eu801.gitpod.io”.
  • Paste the link as the solution link in freeCodeCamp.
1 Like

It seems to be an issue with Gitpod, not sure if all the challenges/projects have been tested before the switch to Gitpod from Replit.

Locally, it works just fine without having to comment out the other tests. And it worked on Replit as well last I checked.


I opened an issue for it.

1 Like

It seemed like I was missing something, and this was it. Thanks alot!

I am also having the same issue as the original poster. I have gone through and commented out all the tests (except the two for the lesson) in both 1_unit-tests.js and in 2_functional-tests.js

What I am left with in GitPod after running npm run start is

Running Tests…

  Unit Tests
    Basic Assertions
      ✔ #isNull, #isNotNull

  1 passing (3ms)

However, when I copy/paste the GitPod environment link into the Solution Link field and select the “I’ve completed this challenge” button I get the following:

// running tests 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]

Screenshots


You should use the URL from the preview window. The one that starts with the port number.

3000-something.gitpod.io

Excellent. That did it. Thank you!