jest: Regression: test.only does not group skipped tests anymore
π Bug Report
According to #2593 a .only on a test should remove the other tests from the test output.
To Reproduce
Steps to reproduce the behavior:
- Choose a testcase
- Annotate it with .only:
it.only("should print only one test", async () => {
await Promise.resolve(true)
}
- Run jest
Expected behavior
Only the single test should be in the output.
Link to repl or repo (highly encouraged)
https://repl.it/repls/NavajowhiteRemoteOutlier
envinfo
Ubuntu 18.04 , Node 10.16.3.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 19
Letβs reopen and discuss. I think changing the behavior for
test.skip
in #8038 was not necessary, also not requested in #7999. It was also an oversight from my side as a reviewer.Still actual in 27.4.7
Also my use case: I have 120 tests and have
.only
on just one of them. When running jest with default settings (also when using --watchAll), all 119 skipped tests are printed, instead of just one that interests me.