-
Notifications
You must be signed in to change notification settings - Fork 310
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
feat: support Jest 29 #1901
feat: support Jest 29 #1901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far it's in good direction. Using Jest transform option like this is the correct way
Thanks for having a look! After some debugging, I think I found what's causing my tests to fail in sequence. It was indeed a caching issue on |
Small update about the current status: I won't have time to continue working on this before the end of the week. But what's left to do (cf. the tasks):
Help is welcome |
Your patch was released as v29.0.4🎉 |
Migrated from `ts-jest` config under `globals`, which is deprecated, to transformers config
@Tommy228 hey any updates on this? Is it ready for the second round of review maybe? |
done in #1937 |
Summary
This PR is my attempt at addressing #1774 and supporting Jest 29.
This migrates all
ts-jest
configs underglobals
, which is deprecated, to transformers config.It also exposes a new
defaultTransformerOptions
object to allow overriding the default transformer more easily.Test plan
I linked it to one of my biggest projects running Angular 15 with 3000+ unit tests. The tests have passed with no warning.
Does this PR introduce a breaking change?
Overriding the config via globals may not work:
Because the preset now provides the config via the transformer, the default configuration (like
tsconfig
) takes precedence over the globals configuration.Instead, this needs to be done (unless there is a better solution?):
Other information
Not sure if I did this right. I'm struggling to get NgJestTransformer unit tests to work. They are working individually but they fail when ran together. I think it has to do with some caching stuff behind
TsJestTransformer
.@angular-builders/jest needs to be updated as well because it passes the
tsconfig
via globals, which does not work anymore.Todo
TsJestTransformer
teststs-jest
to include this patch