-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slowTestThreshold measuring test suite time, not individual test time #10945
Comments
Here's a repo for this issue: https://repl.it/@stdavis/jest-repo-for-10945#slow.test.js |
Thanks @stdavis |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
@SimenB Thanks for the slowTestThreshold option in #9366. I'm trying it out, but it seems to be only applying to a test suite, not individual tests. The docs say "test", so I was assuming an individual
it
ortest
function is what it's measuring. In this setup,package.json
specifies:Screenshots:
Three tests run in this one test suite, all were < 1000 ms (slowTestThreshold = 2), so each test was nice and fast. There was some test suite overhead, which pushed the suite over 2 seconds, which is why it's showing as slow. That's fine, but I'd also like to see if the individual tests are slow. See next image.
I know my overall test suite here is super long, that's why I'm hoping to use slowTestThreshold to work on my longer tests incrementally. As you can see, the arrow points to a test that is 2202 ms long, but nothing distinguishes that row from the rest. Only the test suite time is flagged as slow (55.193 s in this case).
To Reproduce
How to reproduce:
npx jest
in that repoI can't share my code due to confidentiality. But the timing is accurate, and you'll see what I mean in the screenshots.
Expected behavior
I expect that each individual test that is longer than the slowTestThreshold setting in package.json will show that result as slow, not just the test suite as slow. In other words, I want to see all the slow tests highlighted somehow in the runner printout.
Link to repl or repo (highly encouraged)
envinfo
The text was updated successfully, but these errors were encountered: