feat: deprecate karma, migrate to vitest#3706
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the workspace’s unit/integration testing setup from Karma/Jasmine to Vitest (via Analog’s Angular/Vitest tooling), aiming to keep existing Jasmine-style specs working while switching Nx targets to run Vitest.
Changes:
- Added a shared
createVitestConfigand a Jasmine-compat shim (spies, matchers, globals) to reduce test rewrites. - Updated Nx project
testtargets and per-projecttsconfig.spec.jsonto use Vitest, and removed Karma configs. - Updated root dependencies/scripts to support Vitest + jsdom + coverage.
Reviewed changes
Copilot reviewed 129 out of 161 changed files in this pull request and generated 33 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.base.config.ts | Adds shared Vitest config + Jasmine compat shim/plugin |
| types/test.d.ts | Adds ambient typings for Jasmine-compat globals |
| package.json | Updates scripts/deps: remove Karma/Jasmine, add Vitest tooling |
| nx.json | Updates Nx named inputs / test inputs for Vitest config |
| karma.conf.js | Removes root Karma configuration |
| apps/keira/vitest.config.ts | Adds app Vitest config using shared base |
| apps/keira/src/tsconfig.spec.json | Switches app test TS types/includes to Vitest + custom d.ts |
| apps/keira/project.json | Switches app test target to nx:run-commands (vitest run) |
| apps/keira/src/karma.conf.js | Removes app Karma config |
| apps/keira/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/utils/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/utils/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/utils/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/utils/karma.conf.js | Removes lib Karma config |
| libs/shared/utils/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/switch-language/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/switch-language/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/switch-language/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/switch-language/karma.conf.js | Removes lib Karma config |
| libs/shared/switch-language/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/selectors/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/selectors/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/selectors/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/selectors/karma.conf.js | Removes lib Karma config |
| libs/shared/selectors/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/sai-editor/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/sai-editor/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/sai-editor/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/sai-editor/karma.conf.js | Removes lib Karma config |
| libs/shared/sai-editor/src/sai-editor.component.integration.spec.ts | Adjusts integration test timing (extra tickAsync) |
| libs/shared/sai-editor/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/preview/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/preview/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/preview/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/preview/karma.conf.js | Removes lib Karma config |
| libs/shared/preview/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/model-3d-viewer/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/model-3d-viewer/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/model-3d-viewer/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/model-3d-viewer/karma.conf.js | Removes lib Karma config |
| libs/shared/model-3d-viewer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/loot-editor/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/loot-editor/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/loot-editor/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/loot-editor/karma.conf.js | Removes lib Karma config |
| libs/shared/loot-editor/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/login-config/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/login-config/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/login-config/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/login-config/karma.conf.js | Removes lib Karma config |
| libs/shared/login-config/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/db-layer/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/db-layer/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/db-layer/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/db-layer/karma.conf.js | Removes lib Karma config |
| libs/shared/db-layer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/common-services/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/common-services/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/common-services/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/common-services/karma.conf.js | Removes lib Karma config |
| libs/shared/common-services/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/base-editor-components/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/base-editor-components/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/base-editor-components/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/base-editor-components/karma.conf.js | Removes lib Karma config |
| libs/shared/base-editor-components/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/shared/base-abstract-classes/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/shared/base-abstract-classes/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/shared/base-abstract-classes/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/shared/base-abstract-classes/karma.conf.js | Removes lib Karma config |
| libs/shared/base-abstract-classes/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/main/main-window/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/main/main-window/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/main/main-window/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/main/main-window/karma.conf.js | Removes lib Karma config |
| libs/main/main-window/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/main/connection-window/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/main/connection-window/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/main/connection-window/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/main/connection-window/karma.conf.js | Removes lib Karma config |
| libs/main/connection-window/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/unused-guid-search/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/unused-guid-search/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/unused-guid-search/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/unused-guid-search/karma.conf.js | Removes lib Karma config |
| libs/features/unused-guid-search/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/trainer/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/trainer/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/trainer/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/trainer/karma.conf.js | Removes lib Karma config |
| libs/features/trainer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/texts/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/texts/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/texts/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/texts/karma.conf.js | Removes lib Karma config |
| libs/features/texts/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/sql-editor/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/sql-editor/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/sql-editor/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/sql-editor/karma.conf.js | Removes lib Karma config |
| libs/features/sql-editor/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/spell/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/spell/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/spell/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/spell/karma.conf.js | Removes lib Karma config |
| libs/features/spell/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/smart-scripts/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/smart-scripts/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/smart-scripts/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/smart-scripts/karma.conf.js | Removes lib Karma config |
| libs/features/smart-scripts/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/quest/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/quest/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/quest/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/quest/karma.conf.js | Removes lib Karma config |
| libs/features/quest/src/quest-template-addon/quest-template-addon.integration.spec.ts | Adjusts integration test timing (extra tickAsync) |
| libs/features/quest/src/quest-request-items/quest-request-items.integration.spec.ts | Adjusts integration test timing (extra tickAsync) |
| libs/features/quest/src/quest-offer-reward/quest-offer-reward.integration.spec.ts | Adjusts integration test timing (extra tickAsync) |
| libs/features/quest/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/other-loots/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/other-loots/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/other-loots/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/other-loots/karma.conf.js | Removes lib Karma config |
| libs/features/other-loots/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/item/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/item/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/item/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/item/karma.conf.js | Removes lib Karma config |
| libs/features/item/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/gossip/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/gossip/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/gossip/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/gossip/karma.conf.js | Removes lib Karma config |
| libs/features/gossip/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/gameobject/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/gameobject/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/gameobject/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/gameobject/karma.conf.js | Removes lib Karma config |
| libs/features/gameobject/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/game-tele/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/game-tele/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/game-tele/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/game-tele/karma.conf.js | Removes lib Karma config |
| libs/features/game-tele/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/dashboard/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/dashboard/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/dashboard/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/dashboard/src/dashboard.component.spec.ts | Adjusts assertion for console.error spy |
| libs/features/dashboard/karma.conf.js | Removes lib Karma config |
| libs/features/dashboard/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/creature/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/creature/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/creature/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/creature/karma.conf.js | Removes lib Karma config |
| libs/features/creature/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
| libs/features/conditions/vitest.config.ts | Adds lib Vitest config using shared base |
| libs/features/conditions/tsconfig.spec.json | Switches lib test TS types/includes to Vitest + custom d.ts |
| libs/features/conditions/project.json | Switches lib test target to nx:run-commands (vitest run) |
| libs/features/conditions/karma.conf.js | Removes lib Karma config |
| libs/features/conditions/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json | (Should not be committed) Vitest/Vite cache artifact |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.