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?
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.