Migrate active unit tests from Jest to Vitest - #80992
Draft
ciampo wants to merge 8 commits into
Draft
Conversation
|
Size Change: +8 B (0%) Total Size: 7.76 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
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.
What?
See #80855.
TL;DR: Migrates the active package and integration test suites from Jest APIs to explicit Vitest imports, mocks, timers, snapshots, and project-scoped environments. The stack now routes 1,001 tests through Vitest and leaves five Jest tooling suites for the dedicated cleanup/cutover PRs.
Why?
This is the main test-conversion step in the consolidated Jest-to-Vitest migration. It preserves the existing test intent and CI partition while making Vitest the runner for nearly the entire active suite.
How?
vitestAPIs with globals disabled.@wordpress/block-editorstore and@wordpress/interfacepackage; publishing complete package declarations remains the follow-up documented in Migrate JavaScript unit and integration tests from Jest to Vitest #80855.Snapshot review
All 79 changed snapshot files were reviewed. Changes are runner headers and nested-suite key formatting, except for the tested Emotion serializer normalization that replaces generated hashes while retaining stable component labels.
Testing Instructions
The focused
PostTaxonomiestest, exact 1,001-file Vitest convention/type graph, and rebuilt full stack pass after resolving the taxonomy fixture. The repository-wide Markdown and dependency lint commands still report their pre-existing baselines; the changed documentation lines introduce no new Markdown violations.Testing Instructions for Keyboard
Not applicable; this changes test infrastructure and test implementations, not UI behavior.
Screenshots or screencast
Not applicable.
Use of AI Tools
Codex was used to implement the migration, run verification, and perform adversarial self-review. The results and changes were reviewed by the author.