I have a basic REST API in a server file. If I want to run tests on the routes, how do I do so?
I can think of 2 ways to do so:
In the test command, first start the server using a child process and then send requests to
localhostin the unit tests.Write unit tests for all the functions I've written in my code and run them without running the server (Does this mean I can't do integration testing?)
I'm really not sure what to do, I need help.









Did you have a look at Postman? It's a really helpful tool for testing your API. It enables you to do integration testing