You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge the globals property from any preset into the project configuration rather than overwriting it.
Motivation
Some third party libraries (e.g. ts-jest) use the globals property to provide configuration. It would be useful to be able to provide shared configuration and only override certain fields within the globals.
This isn't limited to the configuration of third party libraries, but this may be the most obvious use case. A simple repro repo that illustrates how globals currently gets clobbered is available at https://github.com/jdpearce/jest-globals-test
The text was updated successfully, but these errors were encountered:
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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🚀 Feature Proposal
Merge the
globals
property from any preset into the project configuration rather than overwriting it.Motivation
Some third party libraries (e.g.
ts-jest
) use theglobals
property to provide configuration. It would be useful to be able to provide shared configuration and only override certain fields within the globals.Example
The preset could look something like this :
And the project config could simply contain the following :
(Or similar)
This would result in an options object which contained :
This isn't limited to the configuration of third party libraries, but this may be the most obvious use case. A simple repro repo that illustrates how
globals
currently gets clobbered is available at https://github.com/jdpearce/jest-globals-testThe text was updated successfully, but these errors were encountered: