-
-
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
[Bug]: test.concurrent does not respect testNamePattern #12588
Comments
Turns out that Jest's `test.concurrent()` does not play well when running `jest -t TESTNAME`: jest will actually start all tests, not just the one you were trying to run. Reported here: jestjs/jest#12588 We used to have something to opt-out of concurrent running: we have to flip that around, and opt in to concurrent running only for the canary and pipeline tests, where we *know* for a fact we're not filtering.
Turns out that Jest's `test.concurrent()` does not play well when running `jest -t TESTNAME`: jest will actually start all tests, not just the one you were trying to run. Reported here: jestjs/jest#12588 We used to have something to opt-out of concurrent running: we have to flip that around, and opt in to concurrent running only for the canary and pipeline tests, where we *know* for a fact we're not filtering.
Turns out that Jest's `test.concurrent()` does not play well when running `jest -t TESTNAME`: jest will actually start all tests, not just the one you were trying to run. Reported here: jestjs/jest#12588 We used to have something to opt-out of concurrent running: we have to flip that around, and opt in to concurrent running only for the canary and pipeline tests, where we *know* for a fact we're not filtering. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I think the problem is: This problem has a long history. It was introduced by #6267. and
I don't have any experience with |
I saw the note it was "experimental". The note could have said "selecting specific tests to run is impossible with It looks like this was done to avoid having to make changes to the runner itself. The runner remains sequential. |
@rix0rrr would you mind making a pr to suggest those changes to jest doc? |
@SimenB please add
|
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. |
Version
27.5.1
Steps to reproduce
Code:
Commands:
Expected behavior
I expect to see only:
Actual behavior
I see both console.logs printed, while the test report pretends it only ran one test:
Additional context
No response
Environment
System: OS: macOS 10.15.7 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Binaries: Node: 16.4.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.18.1 - /usr/local/bin/npm npmPackages: jest: ^27.5.1 => 27.5.1
The text was updated successfully, but these errors were encountered: