-
-
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
JEST_WORKER_ID starts with 0. #8204
Comments
Ok turns out I couldn't not reproduce because I was using CRA and |
Thanks for reporting, I'll take a look. |
The way we instantiate workers now is different. The original implementation assigned workers in a for loop and assigning id as Where as here we now have. I've tested this locally and this only occurs when the tests are ran in parallel. Small regression that happened during the migration to typescript |
Yes, I noticed that. This used to work (and still does for |
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> <!-- Please remember to update CHANGELOG.md in the root of the project if you have not done so. --> ## Summary Fixes #8204 It's weird that it's 1-indexed (I looked at making our `workerId` 1-indexed too for consistency, but that would make our code really weird), but I guess it's documented, used to work like that and still does for `runInBand` 🤷♂️ <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## Test plan <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->
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
JEST_WORKER_ID starts from 0 instead of 1 specified here:
https://github.com/facebook/jest/blob/master/packages/jest-worker/README.md
To Reproduce
Its on a private repo. I have tried reproducing it on a public repo but I couldn't get it to work.
I have two
.spec.ts
files with the same content:0
and1
is printed.Expected behavior
1
and2
to be printed.The text was updated successfully, but these errors were encountered: