Scope
Supported
Vitestify ships four packs — core, jest, nx, and angular-cli.
Core
- Generate
vitest.config.mts, install dependencies, and pick environment (jsdom,node, etc.) from project heuristics. - Clone Jest setup files for Vitest (strips
jest-preset-angularusage). - Set
tsconfig.spec.jsonmoduletopreservewhen it wascommonjs. - Add framework setup when detected — Angular (Analog), React (
@vitejs/plugin-react), Testing Library cleanup. - Guard
@testing-library/jest-domimports so Jest and Vitest can share setup files.
Jest
- Rename Jest tests to
.jest.cts/.jest.tsxso Vitest skips them while config is set up. - Point Jest
testMatchat.jestextensions. - Rewrite common Jest APIs, mocks, snapshots, and types to Vitest.
- Rename migrated tests back to
.spec.*, run Vitest, and roll back failures to.jest.*.
Nx
- Rename the
testtarget tojestinproject.json. - Rename
@nx/jest/plugin'stesttarget tojest, and add@nx/vitest. - Remove the legacy
testtarget fromproject.jsononce Vitest provides one. - Set
watch: falsein generated Vitest config for Nx CI.
Angular CLI
- Swap
@angular-builders/jest:runfor@analogjs/vitest-angular:test.
🚧 Future Work
- Issue #19 - Add check mode for CI migration gates
- Issue #20 - Allow include/exclude filters for files and transforms
- Issue #21 - Add agentic workflow for non-trivial migrations (e.g. browser mode)
- Issue #22 - Add transform to disable Vitest test isolation
Transform reference
Internal transform ids, useful when reading CLI output or debugging a run:
Core
- setup-files — clones Jest setup files for Vitest and strips
jest-preset-angular - testing-library-jest-dom — wraps
@testing-library/jest-domimports so they only load under Jest - rename-spec-to-jest — renames Jest tests to
.jest.cts/.jest.tsx - tsconfig — sets
tsconfig.spec.jsonmoduletopreservewhen it wascommonjs - vitest-config — generates
vitest.config.mts, installs dependencies, and adds framework setup when detected
Jest
- config-test-match — points Jest
testMatchat.jestextensions - jest-test — orchestrates test rewrites, runs Vitest, and rolls back on failure
- jest-globals-import — rewrites
@jest/globalsimports tovitest - jest-mock — rewrites
jest.mockand related mock APIs tovi - jest-set-mock — rewrites
jest.setMocktovi.mock - jest-set-timeout — rewrites
jest.setTimeouttovi.setConfig({ testTimeout }) - jest-types — rewrites Jest type references to Vitest equivalents
- jest-vi — rewrites
jest.*calls tovi.* - jest-focus-skip-shorthand — rewrites
fit/xitshorthands toit.only/it.skip - snap — normalizes Jest snapshot formatting to Vitest
- vitest-imports — adds missing
vitestimports for globals in use - rename-jest-to-spec — renames
.jest.*tests back to.spec.*after rewrite
- jest-globals-import — rewrites
Nx
- nx-jest-target — renames the
testtarget tojestinproject.json - nx-plugins — renames
@nx/jest/plugin's target tojestand adds@nx/vitest - nx-project-json — removes the legacy
testtarget fromproject.json - nx-vitest-watch — sets
watch: falsein Vitest config for Nx CI
Angular CLI
- angular-builder-jest — swaps the Angular Jest builder for Analog Vitest