-
-
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
setupFiles or setupFilesAfterEnv are no longer awaited #10962
Comments
There is nothing to wait for (Jest cannot detect that you've fired off promises in your setup file). This has never worked before either, meaning there's no regression, so I'll close this. That said, we could start to |
Thanks @SimenB , indeed , I was not sure it was a regression. |
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. |
💥 Regression Report
I'm not sure it's a regression and I guess using Jest well, but it seems the setupFiles and setupFilesAfterEnv modules are no longer blocking in the Jest execution sequence flow.
I mean, if there is an async function in one of the setupFiles or setupFilesAfterEnv Jest doesn't wait the end of the promise.
Last working version
Worked up to version: ?
Stopped working in version: 24.9.0
To Reproduce
Create a simple project like this :
https://repl.it/join/tlxcxyac-mathieubreton
By running a
yarn test
you should see that:Expected behavior
Jest should wait the end of the promise resolution in the setupFiles or setupFilesAfterEnv before continue and wait to execute test suites.
Link to repl or repo (highly encouraged)
https://repl.it/join/tlxcxyac-mathieubreton
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: