While doing integration tests on my express server, the code coverage feature of jest seems to only be working when the server is running in the same process as the test. For example:- importing express app and passing it to the supertest function, or importing the express app in the test file, initializing it and making requests to the endpoint it's running at.
When the express server is run in a seperate process the code coverage is always 0. By running in a seperate process I mean running the server in a different terminal or running it in through jest's global setup option.
I wanted to know is this an expected behavior and is this how jest fundamentally works? Or am I making some mistake here?