chore: migrate unit test runner from Jest to Vitest#1565
Merged
Conversation
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]>
f7d3812 to
30d163a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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 🚀 New features to boost your workflow:
|
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.
Summary
Changes
jest,ts-jest,@types/jest; addvitest,@vitest/coverage-v8jest.config.mjswithvitest.config.ts(includes resolve aliases fortsmoduleandgraphql)jest.fn()withvi.fn()in 6 filesjest→vitest,jest:ci→vitest:ci,watch:jest→watch:vitestbuild.ymlTest plan
npx vitest runpasses all 424 testsnpx vitest run --coveragegenerates coverage report atcoverage/coverage-final.json🤖 Generated with Claude Code