-
-
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
[Feature]: Allow globalSetup
to access things in globals
#12436
Comments
Hi @SimenB , if you think that is by design and cannot be changed, feel free to close this issue :) If you have other alternative ways, pls give me suggestions. |
Since |
Does it mean, if users have a repo with Jest
Jest shouldn't run |
I'd assume so, try it out? I've never used the global hooks at all, so I haven't really internalised how they work. #6865 implemented it in projects, looking at it might provide clues? |
Thanks for the information. Reading the motivation from #6865, it means
Since
I think passing |
Yeah, that's what I meant in #12436 (comment) |
…` function as 2nd argument Closes jestjs#12436
…` function as 2nd argument Closes jestjs#12436
…` function as 2nd argument Closes jestjs#12436
…` function as 2nd argument Closes jestjs#12436
…` function as 2nd argument Closes jestjs#12436
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. |
🚀 Feature Proposal
Include
globals
in global config so thatglobalSetup
orglobalTeardown
can use it.Motivation
I notice that Jest has
globals
, but it isn't included in global config. When I look at nameglobals
, I was thinking about it would be included in global config. So it would match with things related to "global".I have a use case thymikee/jest-preset-angular#1348 which if Jest allows
globals
to be in global config, it will look beautiful.Example
Define in Jest config
In a
globalSetup
scriptPitch
This would be a change in Jest config. I think it should be in core.
The text was updated successfully, but these errors were encountered: