Skip to content

build(deps): upgrade jest 30 and jest-preset-angular 17 - #1011

Merged
yogeshchoudhary147 merged 3 commits into
mainfrom
fix/upgrade-jest-30
Aug 28, 2026
Merged

build(deps): upgrade jest 30 and jest-preset-angular 17#1011
yogeshchoudhary147 merged 3 commits into
mainfrom
fix/upgrade-jest-30

Conversation

@yogeshchoudhary147

@yogeshchoudhary147 yogeshchoudhary147 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrades jest^30.0.0, jest-preset-angular^17.0.0, @types/jest^30.0.0
  • Adds jest-environment-jsdom@^30.0.0 (no longer bundled with jest since v28)
  • Drops @angular/platform-browser-dynamicjest-preset-angular@17 no longer requires it, unblocking future Dependabot Angular group PRs

Fixes required for jest 30 / Node 22

  • jest.config.ts: jest-preset-angular/presetsjest-preset-angular/presets/index.js (Node 22 disallows directory imports in ES modules)
  • auth.client.spec.ts: toThrowError removed in jest 30 → toThrow
  • auth.service.spec.ts: direct window.location.search assignment dropped in jsdom 26 → window.history.replaceState
  • Lockfile regenerated with npm 10 / Node 22 to correctly resolve @noble/hashes@2.4.0 peer dep introduced by jsdom 26

Test plan

  • npm run test:ci — 190 passed, 0 failed

Summary by CodeRabbit

  • Chores

    • Updated the testing toolchain to newer Jest and Angular Jest preset versions.
    • Added the required browser-like test environment support.
  • Tests

    • Improved test compatibility with the updated testing tools.
    • Refined URL query-string setup and error assertions without changing expected behavior.

@yogeshchoudhary147
yogeshchoudhary147 requested a review from a team as a code owner August 28, 2026 04:36
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 570a0b31-c218-40c0-9765-08fd73de4799

📥 Commits

Reviewing files that changed from the base of the PR and between 1a94bb2 and 69d9c99.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json
  • projects/auth0-angular/jest.config.ts
  • projects/auth0-angular/src/lib/auth.client.spec.ts
  • projects/auth0-angular/src/lib/auth.service.spec.ts
  • projects/playground/jest.config.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The pull request upgrades Jest tooling to version 30, updates preset imports, and adjusts two tests for compatible assertion and browser history APIs.

Changes

Jest 30 upgrade

Layer / File(s) Summary
Jest tooling dependencies
package.json
@types/jest, jest, and jest-preset-angular were upgraded. jest-environment-jsdom was added.
Jest configuration and test compatibility
projects/auth0-angular/jest.config.ts, projects/playground/jest.config.ts, projects/auth0-angular/src/lib/auth.client.spec.ts, projects/auth0-angular/src/lib/auth.service.spec.ts
Preset imports now use presets/index.js. One test uses toThrow, and another sets the query string with window.history.replaceState.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 69d9c

This PR upgrades the Jest tooling and updates compatible configuration and test assertions; with 190 tests passing, no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: amitsingh05667

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main changes: upgrading Jest to version 30 and jest-preset-angular to version 17.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/upgrade-jest-30

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

package.json

Parsing error: Unexpected token :


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Drops deprecated @angular/platform-browser-dynamic peer dep that caused
recurring ERESOLVE conflicts on Dependabot Angular patch bumps.
Node 22 disallows directory imports in ES module context. Also regenerate
lockfile with npm 10 to include @noble/hashes@2.4.0 for the jsdom tree.
Replace toThrowError (removed in jest 30) with toThrow, and use
window.history.replaceState instead of direct location.search assignment
(required by jsdom 26). All other lines restored to match main.
@yogeshchoudhary147

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yogeshchoudhary147
yogeshchoudhary147 merged commit a45b027 into main Aug 28, 2026
16 of 17 checks passed
@yogeshchoudhary147
yogeshchoudhary147 deleted the fix/upgrade-jest-30 branch August 28, 2026 06:35
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.

2 participants