Metric-Imperial Converter - Functional tests work locally but crash on Replit?

My project seems to work just fine and passes both unit and functional tests on my machine (localhost)

and also on replit when I don’t allow functional tests to happen…

Except when I add “module.exports = app”. Then it just crashes over and over again.


Blank!

I deleted my Replit project and re-imported it from my GitHub repo to see if that fixed the issue, and it’s just the same. As you can see I also increased the timeout in server.js.

My .env NODE_ENV secret is properly set to “test”. My dependencies are correctly installed. And this is my code: GitHub - davidsantana980/freedomConverter: A simple API to convert Imperial Units to Metric and vice versa

Any help/idea would be tremendously appreciated!

Thank you for that suggestion, however I’m afraid I’m not seeing it yet. Could you be more precise?

Hello. Same issue for me in replit. At the browser console 502 Bad Gateway error. Without functional tests, everything works perfectly.

Hey there! What solved it for me was changing the server variable in 2_functional-tests.js to a string with my project’s replit link.

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