-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Sm jest mock extended #17506
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
Sm jest mock extended #17506
Conversation
…bitwarden/clients into renovate/jest-mock-extended-4.x
|
Claude finished @cd-bitwarden's task —— View job PR Review CompleteTodo List:
SummaryThis PR reverts jest-mock-extended from v4.0.0 back to v3.0.7 due to compatibility issues with the project's current Jest 29 installation (jest-preset-angular 14.6.1 and ts-jest 29.4.5). The revert includes updating numerous test files to use the v3 API ( Findings💭 Finding 1: PR documentation is insufficient The PR template is minimally filled out:
Suggested PR description improvements## 🎟️ Tracking
[Add Jira ticket reference]
## 📔 Objective
Revert jest-mock-extended from v4.0.0 to v3.0.7 to fix Docker build failures in CI.
The upgrade to jest-mock-extended v4 was incompatible with our current Jest 29
installation. jest-mock-extended v4 requires Jest 30, which would require a
larger migration effort including updates to jest-preset-angular and ts-jest.
This PR reverts the dependency and all associated test changes to restore CI stability.
## Test Plan
- ✅ Verify npm ci succeeds in Docker build
- ✅ Verify all tests pass with reverted version
- ✅ Confirm no breaking changes to test behavior💭 Finding 2: Consider documenting the migration path Since this is blocking an upgrade, it would be helpful to:
This would help prevent future attempts to upgrade without the necessary Jest migration. Positive Observations👍 The commit message on b3b6df8 is excellent - it clearly explains:
👍 The revert is comprehensive, covering all test files that were modified in the original upgrade attempt 👍 The change is minimal and focused solely on the dependency reversion and related test updates RecommendationApprove with suggestions: The technical changes are sound and necessary to restore CI stability. The only improvements needed are documentation-related (PR description and potential future tracking). |
|
New Issues (1)Checkmarx found the following issues in this Pull Request
|
quexten
left a comment
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.
Approving km changes
The update to jest-mock-extended v4.0.0 was incompatible with the project's current Jest 29 installation. jest-mock-extended v4 requires Jest 30, which would require a larger migration effort. Changes: - Downgrade jest-mock-extended from 4.0.0 to 3.0.7 - Revert test changes to use v3 API (toBeCalled instead of toHaveBeenCalled) - Revert snapshot files to original state This fixes the Docker build failure in CI where npm ci was failing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The "Get pkg-fetch" step was failing because New-Item throws an error if the directory already exists. This can happen with GitHub Actions runner caching or when retrying failed jobs. Added -Force parameter to New-Item commands to handle existing directories gracefully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17506 +/- ##
==========================================
+ Coverage 41.11% 41.25% +0.13%
==========================================
Files 3543 3546 +3
Lines 101843 102040 +197
Branches 15265 15308 +43
==========================================
+ Hits 41872 42095 +223
+ Misses 58208 58180 -28
- Partials 1763 1765 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|


🎟️ Tracking
📔 Objective
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes