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

220
Visualizações
Jest tests do not show timings for individual tests at random

Jest does not show the timings for each individual test. It will leave some out at random. Here is an example of a test run (in watch mode).

enter image description here

Now if I run this again, I get this result:

enter image description here

You can see how the timings for each individual test sometimes shows, sometimes it doesnt. What drives this? And how can i make it show timings for every test always?

Here is my jest config inside package.json

"jest": {
    "verbose": true,
    "moduleFileExtensions": [
      "js",
      "json",
      "ts"
    ],
    "rootDir": "src",
    "testRegex": ".*\\.spec\\.ts$",
    "transform": {
      "^.+\\.(t|j)s$": "ts-jest"
    },
    "collectCoverageFrom": [
      "**/*.(t|j)s"
    ],
    "coverageDirectory": "../coverage",
    "testEnvironment": "node"
  },
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is determined by the reporter used by Jest (e.g default, jest-junit). Using the default reporter, you can get the timings for all tests using jest --verbose.

EDIT:

It looks like you might be using a custom reporter, and slowTestThreshold and colors might be overridden in your project. The default is 5 seconds, according to https://github.com/facebook/jest/blob/e7edb75f8357090714213f252c5aaaa9b3c29f5f/packages/jest-config/src/Defaults.ts#L64 .

about 4 years ago · Juan Pablo Isaza Relatório
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