Personal Library - Functional tests blocking FCC tests?

Step1
I set the NODE_ENV and DB(MongoDB) key in the replit’s secrets tab.

Step2
I implemented the routing process in the file routes/api.js.

Step3
I ran FCC tests and passed except for the last FCC8 (All 10 functional tests required are complete and passing).

Step4
I implemented functional tests in tests/2_functional-tests.js.

Step5
I started the app by pressing the run button in the replit

Step6
I ran a functional test on the replit console and saw 10 passing messages

Step7
Now when I ran the FCC tests and checked the results, all but the first FCC1 failed (Test timed out).

As far as the behavior of the app is concerned, the code written in the functional test seems to block the FCC test. Could you point out if there are any suspicious parts in my code?

My project links
Replit: https://boilerplate-project-library.makotoaraki.repl.co
Github: GitHub - Makoto-Araki/boilerplate-project-library: A boilerplate for a freeCodeCamp project.

solution: boilerplate-project-library - Replit

Your browser information:

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

Challenge: Quality Assurance Projects - Personal Library

Link to the challenge:

I just had this issue, increasing the timeout in the server.js file fixed it for me:

setTimeout(function () {
      try {
        runner.run();
      } catch(e) {
          console.log('Tests are not valid:');
          console.error(e);
      }
    }, 5500);  //was previously 1500

Not sure if its related to your issue, but I’ve had issues with functional tests killing the server, meaning after they run, the server no longer listens for querys. It’s evident when after all your functional tests pass, the website becomes unresponsive and times out (including going to its link, not just the FCC tests).

Thats was my thread where I found a work around. Basically running a final test with the after method but not closing it keeps the server open… not sure if that will help in your case, but worth a try.

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

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