Skip to content

chore: migrate unit test runner from Jest to Vitest#1565

Merged
Quramy merged 4 commits intomainfrom
migrate_to_vitest
Feb 20, 2026
Merged

chore: migrate unit test runner from Jest to Vitest#1565
Quramy merged 4 commits intomainfrom
migrate_to_vitest

Conversation

@Quramy
Copy link
Owner

@Quramy Quramy commented Feb 20, 2026

Summary

  • Replace Jest (30.2.0) + ts-jest with Vitest for unit testing
  • Vitest provides native TypeScript support via esbuild, eliminating the ts-jest dependency
  • All 33 test files (424 tests) pass successfully

Changes

  • Dependencies: Remove jest, ts-jest, @types/jest; add vitest, @vitest/coverage-v8
  • Config: Replace jest.config.mjs with vitest.config.ts (includes resolve aliases for tsmodule and graphql)
  • Test files: Replace jest.fn() with vi.fn() in 6 files
  • Snapshots: Regenerated all snapshots in Vitest format
  • Scripts: jestvitest, jest:civitest:ci, watch:jestwatch:vitest
  • CI: Update codecov step name in build.yml

Test plan

  • npx vitest run passes all 424 tests
  • npx vitest run --coverage generates coverage report at coverage/coverage-final.json
  • CI build passes with codecov upload

🤖 Generated with Claude Code

Replace Jest with Vitest for faster, esbuild-based test execution
with native TypeScript support, eliminating the need for ts-jest.

- Remove jest, ts-jest, @types/jest; add vitest, @vitest/coverage-v8
- Add vitest.config.ts with tsmodule and graphql resolve aliases
- Replace jest.fn() with vi.fn() in 6 test files
- Regenerate all snapshots in Vitest format
- Update package.json scripts and CI workflow

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.05%. Comparing base (a8bdb2e) to head (05c90b0).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
- Coverage   96.52%   92.05%   -4.48%     
==========================================
  Files          80       78       -2     
  Lines        5964     5777     -187     
  Branches     1195     1052     -143     
==========================================
- Hits         5757     5318     -439     
- Misses        200      459     +259     
+ Partials        7        0       -7     

see 62 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Quramy Quramy merged commit 9211d20 into main Feb 20, 2026
2 of 3 checks passed
@Quramy Quramy deleted the migrate_to_vitest branch February 20, 2026 09:22
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.

1 participant