Skip to content

Upgrade jest to v30 #3175

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Upgrade jest to v30 #3175

wants to merge 3 commits into from

Conversation

MillerSvt
Copy link

@MillerSvt MillerSvt commented Jun 26, 2025

Summary

Jest has been updated to version 30, and Node.js and TypeScript have been brought up to the minimum versions supported by the latest Jest release.

Jest now uses a new unrs-resolver, which don't have the packageFilter option. After reviewing the code, I couldn't find any usages of ngJestResolver, so I removed it. Feel free to discuss.

Test plan

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Resolves: #3152

Copy link
Collaborator

@ahnpnl ahnpnl left a comment

Choose a reason for hiding this comment

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

I know it might be difficult to add support for v30 without dropping v29, did you try that?

@MillerSvt
Copy link
Author

I know it might be difficult to add support for v30 without dropping v29, did you try that?

No, I don't. Do we really need that?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 2, 2025

I know it might be difficult to add support for v30 without dropping v29, did you try that?

No, I don't. Do we really need that?

I would like to hold off for major release to wait for ts-jest v30 and explore the possibility to support 2 major versions

@MillerSvt
Copy link
Author

support 2 major versions

Do we need modify workflows to run tests for each supported jest major versions?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 2, 2025

The current workflow is good. We just need one example app to stay on Jest 29 is good, for example we can use example-app-v18 for that

@MillerSvt
Copy link
Author

@ahnpnl Docs lint fails. I suggest two options:

  1. Reformat docs by tabWidth: 4
  2. Create separate .prettierrc.docs.json with tabWidth: 2 for docs

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 2, 2025

@ahnpnl Docs lint fails. I suggest two options:

  1. Reformat docs by tabWidth: 4
  2. Create separate .prettierrc.docs.json with tabWidth: 2 for docs

That is expected. I think it’s better to revert the change. We only run prettier CLI on docs and workflow config while ESLint format differently. That will avoid making too many changes to this PR too

@MillerSvt
Copy link
Author

I think it’s better to revert the change

Fixed

support 2 major versions

Fixed

@MillerSvt MillerSvt force-pushed the upgrade-jest branch 2 times, most recently from 1c6507b to 5537df1 Compare July 3, 2025 01:02
@MillerSvt
Copy link
Author

@ahnpnl I won't fix any more conflicts. New ones every couple of hours. Fix it yourself when you have time.

@swierzbicki
Copy link

@ahnpnl when this could be merged?

@MillerSvt MillerSvt requested a review from ahnpnl July 10, 2025 07:34
FrozenPandaz pushed a commit to nrwl/nx that referenced this pull request Jul 11, 2025
## Current Behavior

Jest v30 is not supported.

**Note**: this is currently awaiting for `jest-preset-angular` to
support Jest v30:
thymikee/jest-preset-angular#3175.

## Expected Behavior

Jest v30 should be supported.

## Related Issue(s)

Fixes #31778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Support Jest 30
5 participants