Jest: Regression: test.only does not group skipped tests anymore

Created on 20 Sep 2019  路  13Comments  路  Source: facebook/jest

馃悰 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:

  1. Choose a testcase
  2. Annotate it with .only:
it.only("should print only one test", async () => {
await Promise.resolve(true)
}
  1. 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.


Regression

Most helpful comment

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.

All 13 comments

This behavior was changed in v23 if I remember correctly, so it works as expected.

@thymikee I'm using 24.9.0 and it still shows skipped tests. Can you reopen?

@sheerun If you have a minimal repro case we can download, please create a new issue and post there.

@thymikee I don't get it. Author of this issue already posted issue and minimal repro that you can even run in browser

It was changed with this PR: https://github.com/facebook/jest/pull/8038 to fix #7999.
@SimenB do you think we should bring back grouping skipped tests and leave todo as is now?

This issue happens in 24.9.0 which has been released in August while this PR has been merged in March.. It is a regression

(it's happening not in verbose mode, but normal mode)

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.

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.

Any chance to revert this change?

Any news here? just hit this as well. Very annoying.

I am seeing the same issue here, when I focus on a few tests out of dozens. Any updates?

Happy yearversary of this issue everyone...

Was this page helpful?
0 / 5 - 0 ratings