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
With v29 deprecating ts-jest in globals, it's now nearly impossible to both use a preset and pass options. Presets are just recipes and extending them should be trivial. To pass options, we currently would have to copy the recipe (which mostly defeats the purpose), and then add our custom options, or do some crazy remapping of the preset values, adding our config that way.
It's actually pretty surprising to me that this was released with no way to extend presets, and the docs have both a page for Presets and a page for Options, and the two cannot be made to work together.
This could be accommodated by add a withOptions function on each preset that's basically a factory for creating the preset with the options merged in.
If there's a better way, I'd love to hear it. Thank you.
Motivation
My motivation is to make it trivial to add options to presets, thereby making them useful again in cases where a tsconfig path or some other option needs to be adjusted.
Example
No response
The text was updated successfully, but these errors were encountered:
馃殌 Feature Proposal
With v29 deprecating
ts-jest
inglobals
, it's now nearly impossible to both use a preset and pass options. Presets are just recipes and extending them should be trivial. To pass options, we currently would have to copy the recipe (which mostly defeats the purpose), and then add our custom options, or do some crazy remapping of the preset values, adding our config that way.It's actually pretty surprising to me that this was released with no way to extend presets, and the docs have both a page for Presets and a page for Options, and the two cannot be made to work together.
This could be accommodated by add a
withOptions
function on each preset that's basically a factory for creating the preset with the options merged in.If there's a better way, I'd love to hear it. Thank you.
Motivation
My motivation is to make it trivial to add options to presets, thereby making them useful again in cases where a
tsconfig
path or some other option needs to be adjusted.Example
No response
The text was updated successfully, but these errors were encountered: