-
-
Notifications
You must be signed in to change notification settings - Fork 198
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: use jest-preset-angular@9 #913
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.
Approved 👍
MIGRATION.MD
Outdated
@@ -20,6 +20,9 @@ In order to make this breaking change as backward compatible as possible, the de | |||
This is as close as possible to the [`smart` merge strategy](https://github.com/survivejs/webpack-merge/tree/v4.2.2#smart-merging) that was used before, so ideally if you didn't use `mergeStrategies` then your configuration should work just as it worked before. | |||
Otherwise you'll have to adjust the `mergeRules` in accordance with your needs. | |||
|
|||
## Jest builder | |||
1. `jest-preset-angular` has been updated to version 9, which uses Angular compiler instead of `ts-jest` in order to transform the TS files. Make sure you understand the implications and perform all the necessary changes to your code base as described in `jest-preset-angular` [CHANGELOG](https://github.com/thymikee/jest-preset-angular/blob/master/CHANGELOG.md). |
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.
Hi, jest-preset-angular
have reverted that change and will still use ts-jest
for isolatedModules: false
. With isolatedModules: true
, codes will be transformed via jest-preset-angular
instead of ts-jest
.
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.
@ahnpnl thanks for noticing. Anyways this update will have to wait until they release stable version 9
.
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.
I'm still waiting for Jest 27. Once Jest 27 is out, version 9 will follow too.
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.
9.0.0 was out.
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.
can we try to update to the latest version now and also update the MIGRATION.MD
? [email protected]
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.
@just-jeb any update on this? still have to use plain jest to run angular tests
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.
I've pushed changes according to the breaking changes from the CHANGELOG, if it passes I'll update the migration guide and merge.
However, if there are issues I won't be able to investigate properly since I'm away from computer until June 20th.
You're welcome to help though if there are issues with the build/tests - while I can't investigate I can release a new version from my phone 😄
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The builder uses
jest-preset-angular@8
which usests-jest
as TS files transformer.What is the new behavior?
The builder uses
jest-preset-angular@9
which uses custom transformer, which, in turn, uses Angular compiler for loading TS files.Does this PR introduce a breaking change?
Closes #999