chore: bump jest to 30, added jest-fail-on-console plugin (#DS-4959)#1501
Merged
Conversation
|
Visit the preview URL for this PR (updated for commit 2fdb4ba): https://koobiq-next--prs-1501-jy74v6m5.web.app (expires Sat, 25 Apr 2026 12:37:29 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repository’s Jest toolchain to Jest 30, adds jest-fail-on-console to tighten test hygiene, and updates affected unit tests/snapshots/config to stay compatible with the newer Jest + jest-preset-angular versions.
Changes:
- Bump Jest ecosystem dependencies (Jest 30,
@types/jest30,jest-preset-angular16) and refreshyarn.lock. - Add
jest-fail-on-consoleto Jest setup and update various tests/snapshots for Jest 30 expectations and output. - Adjust a handful of Angular/schematics test utilities/imports and minor test fixture metadata.
Reviewed changes
Copilot reviewed 40 out of 42 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks updated dependency graph for Jest 30 / preset-angular 16 and transitive upgrades. |
| package.json | Bumps Jest + related deps; adds jest-fail-on-console; updates clean script to clear Jest cache. |
| jest.config.js | Updates Jest configuration (notably adds resetModules and ignore patterns). |
| tools/jest/setup.ts | Adds jest-fail-on-console setup; switches __jest__ global definition approach. |
| tools/api-gen/manifest/snapshots/manifest.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/ng-add/snapshots/ng-add.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/migrations/new-icons-pack/index.spec.ts | Uses public @angular-devkit/core workspace types instead of internal path. |
| packages/schematics/src/migrations/loader-overlay-size-attr/index.spec.ts | Removes internal workspace type import; uses workspaces types. |
| packages/schematics/src/migrations/loader-overlay-size-attr/snapshots/index.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/migrations/icons-replacement/snapshots/index.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/migrations/empty-state-size-attr/snapshots/index.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/migrations/deprecated-icons/index.spec.ts | Removes internal workspace type import; uses workspaces types. |
| packages/schematics/src/migrations/deprecated-icons/snapshots/index.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/schematics/src/migrations/css-selectors/snapshots/index.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/username/snapshots/username.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/tree-select/tree-select.component.spec.ts | Replaces deprecated toThrowError usages with toThrow. |
| packages/components/time-range/snapshots/time-range.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/split-button/split-button.spec.ts | Updates throw assertion style for Jest 30. |
| packages/components/sidepanel/sidepanel.spec.ts | Updates throw assertion; adds missing imports metadata for a test component. |
| packages/components/select/select.component.spec.ts | Replaces deprecated toThrowError usages with toThrow. |
| packages/components/navbar-ic/navbar-ic.spec.html | Updates title markup to kbqNavbarIcTitle directive usage. |
| packages/components/markdown/snapshots/markdown.component.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/loader-overlay/snapshots/loader-overlay.component.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/input/input-password.spec.ts | Adds console error suppression for expected error scenario; updates throw matcher. |
| packages/components/input/input-number.spec.ts | Adds console error suppression for expected error scenario. |
| packages/components/input/snapshots/input-number.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/inline-edit/snapshots/inline-edit.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/form-field/form-field.spec.ts | Converts try/catch error assertion to toThrow; suppresses expected console error. |
| packages/components/form-field/snapshots/form-field.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/file-upload/primitives/file-drop.spec.ts | Tightens expected dropped file payload shape/order. |
| packages/components/file-upload/file-upload.spec.ts | Adds non-empty selectors for test components. |
| packages/components/file-upload/snapshots/file-upload.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/dynamic-translation/snapshots/dynamic-translation.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/dropdown/dropdown.spec.ts | Updates throw matchers; adjusts @for tracking expression. |
| packages/components/datepicker/datepicker.spec.ts | Updates throw matcher for Jest 30. |
| packages/components/core/formatters/filesize/snapshots/formatter.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/core/formatters/date/formatter.spec.ts | Updates throw matcher for Jest 30. |
| packages/components/core/form-field/field-sizing-content.spec.ts | Refactors CSS.supports mocking approach for Jest 30. |
| packages/components/code-block/snapshots/code-block.spec.ts.snap | Snapshot header updated for Jest 30. |
| packages/components/button-toggle/button-toggle.component.spec.ts | Updates throw matcher for Jest 30. |
| packages/components/autocomplete/autocomplete.spec.ts | Updates not.toThrowError to not.toThrow. |
| packages/components-experimental/form-field/snapshots/form-field.spec.ts.snap | Snapshot header updated for Jest 30. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NikGurev
approved these changes
Apr 20, 2026
lskramarov
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.