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).
Now if I run this again, I get this result:
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"
},
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 .