Skip to content
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(testing): use new test environment function from jest-preset-angular #29054

Closed
wants to merge 2 commits into from

Conversation

chabb
Copy link
Contributor

@chabb chabb commented Nov 25, 2024

jest-preset-angular is now using setupZoneTestEnv

Current Behavior

jest-preset-angular issues a deprecation warning

Expected Behavior

this MR removes this warning

Related Issue(s)

Fixes #29165

@chabb chabb requested review from a team as code owners November 25, 2024 09:34
@chabb chabb requested review from JamesHenry and Coly010 November 25, 2024 09:34
Copy link

vercel bot commented Nov 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 3, 2024 4:33pm

Copy link
Member

@leosvelperez leosvelperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

The change looks good overall, but we need to support older versions of jest-preset-angular where this new setup function doesn't exist.

Can you update the PR to conditionally generate the new or old setup depending on the installed version of the jest-preset-angular package? The new setup was made available in version 14.3.0. Let me know if you need help with it.

I rebased the PR, moved the setupZoneTestEnv call to the template file in the @nx/jest package where we generate the import, and added some extra test coverage.

@leosvelperez leosvelperez enabled auto-merge (squash) December 3, 2024 13:19
@leosvelperez leosvelperez changed the title chore(testing): remove depreciation warning feat(testing): use new test environment function from jest-preset-angular Dec 3, 2024
@leosvelperez leosvelperez requested a review from a team as a code owner December 3, 2024 15:57
@leosvelperez leosvelperez requested a review from a team as a code owner December 3, 2024 16:04
@leosvelperez
Copy link
Member

Something is messed up with this PR in CI at the moment and no tasks are run. To unblock it I re-created it at #29169, and I'll close this one.

Thanks a lot for the contribution!

auto-merge was automatically disabled December 3, 2024 17:14

Pull request was closed

@chabb
Copy link
Contributor Author

chabb commented Dec 4, 2024

@leosvelperez Thanks for taking care of the MR, I unfortunately had no time to get back at it this week

Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nx 20.2.0-beta jest-preset-angular not using the latest function setup
2 participants