-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
chore(*/vitest): introduce Vitest and vitest-config package #25286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nclsndr
wants to merge
1
commit into
develop
Choose a base branch
from
chore/introduce-vitest
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,075
−19
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Size Change: 0 B Total Size: 2.69 MB ℹ️ View Unchanged
|
3e6875b to
bd89ad7
Compare
bd89ad7 to
e64b297
Compare
nclsndr
commented
Jan 29, 2026
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example files migrated to prove the scripts and workflow
e64b297 to
f316569
Compare
f316569 to
cd218bc
Compare
a954e88 to
4f1dde7
Compare
4f1dde7 to
3918c33
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pr: chore
This PR contains chore tasks (cleanups, configs, tooling...)
source: tooling
Source is GitHub tooling/tests/ect
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.
What does it do?
Adds
vitest-configinpackages/utils/vitest-config/as a private shared Vitest config:globals: false(explicitdescribe/it/expect/viimports),environment: 'node',include: ['**/*.vitest.test.ts'],testTimeout: 5000, and exclusions aligned with the Jest unit setup.Integrates Vitest in
packages/core/core/:vitest.config.tsthat merges the unit preset with package-specific.test:unit:vitest(run once) andtest:unit:vitest:watch(watch).vitest,vitest-config.Root-level scripts (in root
package.json):test:unit:vitestandtest:unit:vitest:watchthat run Vitest viapackages/core/core/vitest.config.ts.Centralized Vitest version:
package.json:vitestindevDependencies, andvitest: "4.0.18"inresolutionsso the whole monorepo uses the same version.CI (
.github/workflows/tests.yml):unit_back_vitest(Node 20/22/24), same conditions asunit_back, runsyarn test:unit:vitest.Docs:
VITEST_MIGRATION.mdwith setup overview, migration steps (Jest → Vitest,*.vitest.test.ts), and dependency/version strategy.Why is it needed?
*.vitest.test.tspattern so existing*.test.tsJest tests keep running while new or migrated tests use Vitest.How to test it?
Install and run Vitest
From repo root:
Expected: Vitest runs and exits successfully
Run from core package
Expected: Vitest runs and exits successfully
Watch mode
And
Confirm Vitest starts in watch mode (Ctrl+C to stop).
Vitest version
Expected:
vitest/4.0.18 ….Jest still works
Existing Jest unit tests should run unchanged.
Environment: Node 20–24, macOS/Linux. No extra env vars needed for the above.
Related issue(s)/PR(s)
None.