Draft
Conversation
- Remove jest dependencies from package.json - Install vitest and @vitest/browser (v4.0.8 compatible with Angular 21) - Update angular.json to use @angular/build:unit-test - Remove jest config files - Update tsconfig.spec.json to remove jest-specific config - Add vitest imports (describe, it, expect, vi, beforeEach, afterEach) to all spec files - Replace jest.fn() with vi.fn() - Replace jest.spyOn() with vi.spyOn() - Replace jest.SpyInstance with ReturnType<typeof vi.spyOn> - Replace test() with it() in all spec files Co-authored-by: mumenthalers <3604424+mumenthalers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update tests to use vitest framework
Migrate test suite from Jest to Vitest
Jan 21, 2026
42fa7b2 to
0192875
Compare
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.
Migrates the entire test suite to Vitest, removing Jest dependencies and updating Angular configuration to use the native
@angular/build:unit-testbuilder.Changes
Dependencies
jest,jest-environment-jsdom,@types/jest,ts-jestvitest@^4.0.8,@vitest/browser@^4.0.8(Angular 21 compatibility)Configuration
angular.json:@angular-devkit/build-angular:jest→@angular/build:unit-testlibs/core/jest.config.jsandlibs/components/jest.config.jstsconfig.spec.json(removedts-jestconfig)Test Files (22 files)
All spec files updated to use explicit Vitest imports and APIs:
All
jest.*→vi.*andtest()→it()throughout codebase.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.