Quality Assurance Projects - Personal Library. Replit won't accept any requests if it runs tests

Tell us what’s happening:
All tests except the testing one pass whenever I run the program normally, but when I run it in “testing mode” (NODE_ENV=“test”), it won’t respond to any HTTP requests even after completing the tests, thus making it impossible for fCC to run it’s own tests.

This problem seems to come from Replit, since hosting the program locally and doing the tests with localhost works perfectly (but of course, I can’t submit that).

Your project link(s)

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/ Safari/537.36

Challenge: Quality Assurance Projects - Personal Library

Link to the challenge:

This is an issue with the tests crashing the server in your repl. You can mitigate against this simply by adding the following code to the bottom of the functional-tests.js file.

after(function() {

This restarts your repl after it crashes.

1 Like

That works, thanks! <3

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