Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

245
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda