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 - Replit

Your browser information:

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

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

Link to the challenge:

Hi @embsachinimaneesha

Welcome to FCC. Can you please describe the problem you are facing with this particular challenge?

Hi @nibble ,
When I working with the first question of the following mentioned URL, System says the solution is not correct.

  1. https://boilerplate-mochachai.sachinijayasuri.repl.co

  2. https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work

I think your tests are probably timing out on the FCC page because the QA tests crash the repl.
Add the following code to the very bottom of the 2_functional-test.js file:

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

This will restart the repl and allow the FCC challenges to pass.
This code can be useful for all of the QA projects, so you can add it to any other repls which you need to use, if you experience the same issue.

1 Like

The boilerplate was updated to have .keepOpen() in the method chains. You can add that yourself (or using the after code that was posted should work)

https://github.com/freeCodeCamp/boilerplate-mochachai/pull/92/files

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