Migrate active unit tests from Jest to Vitest - #80992
Draft
ciampo wants to merge 10 commits into
Draft
Conversation
|
Size Change: +12 B (0%) Total Size: 7.78 MB 📦 View Changed
|
1 task
|
Flaky tests detected in 58ecf75. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30582519123
|
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 30, 2026 23:46
d81f25e to
f9682b1
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 30, 2026 23:47
58ecf75 to
59f56a3
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 31, 2026 00:38
f9682b1 to
45dbb01
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 00:38
59f56a3 to
8a81022
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 31, 2026 01:12
45dbb01 to
3a61746
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 01:12
8a81022 to
6093aa4
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 31, 2026 02:57
3a61746 to
9878da6
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 02:57
56286a1 to
212550f
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 31, 2026 19:21
9878da6 to
d542198
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
3 times, most recently
from
July 31, 2026 19:46
ff71976 to
34a139f
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-03-projects-browser
branch
from
July 31, 2026 20:00
5d74e5a to
aa8d0ba
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 20:01
34a139f to
ace2c35
Compare
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.
Part of #80855.
What?
TL;DR — test implementation changes: migrate the active package and integration suites from Jest APIs to explicit Vitest imports, mocks, timers, snapshots, and project-scoped environments. Five Jest tooling suites remain temporarily for the later cutover/cleanup PRs.
Why?
This is the main test-conversion step. It preserves existing intent and CI coverage while making Vitest the runner for Gutenberg-owned application, package, and integration tests.
How?
vitestimports with globals disabled.Testing Instructions
npm run test:unit:routing.npm run test:unit:conventions.npm run test:unit -- --runInBand.test:unit:vitestshards.npm run lint:js -- --quiet,npm run lint:pkg-json,npm run lint:lockfile, andnpm run lint:tsconfig.Testing Instructions for Keyboard
Not applicable; this changes tests and infrastructure, not product behavior.
Use of AI Tools
Codex assisted with implementation, conflict reconciliation, and verification. The resulting changes and test output were reviewed by the author.