Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
How exactly does jest's code coverage work during integration tests?

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?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!