Skip to content

feat: deprecate karma, migrate to vitest#3706

Merged
Helias merged 5 commits into
masterfrom
migrate-to-vitest
Mar 30, 2026
Merged

feat: deprecate karma, migrate to vitest#3706
Helias merged 5 commits into
masterfrom
migrate-to-vitest

Conversation

@Helias

@Helias Helias commented Mar 23, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 createVitestConfig and a Jasmine-compat shim (spies, matchers, globals) to reduce test rewrites.
  • Updated Nx project test targets and per-project tsconfig.spec.json to 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.

@Helias Helias merged commit 75e7284 into master Mar 30, 2026
16 of 17 checks passed
@Helias Helias deleted the migrate-to-vitest branch March 30, 2026 20:52
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