Skip to content

Rename Block Editor JSX Test Files - #80977

Draft
ciampo wants to merge 1 commit into
codex/vitest-76-editorfrom
codex/vitest-77-block-editor-jsx
Draft

Rename Block Editor JSX Test Files#80977
ciampo wants to merge 1 commit into
codex/vitest-76-editorfrom
codex/vitest-77-block-editor-jsx

Conversation

@ciampo

@ciampo ciampo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What?

See #80855.

TL;DR: This mechanical filename-normalization slice renames the 64 remaining JSX-bearing Block Editor Jest tests from .js to .jsx, renames the ten Jest snapshot files whose paths depend on those test filenames, and updates the parser and executable-baseline manifests.

Why?

The native Vite end state must not treat every .js file as JSX. Normalizing JSX-bearing test filenames before changing their runner keeps extension changes independently reviewable and preserves the exactly-one-runner identity of every baseline test.

How?

  • Renames 64 Block Editor test files without changing their test behavior.
  • Renames ten snapshot files to the paths Jest derives from the new .jsx test filenames. Git identifies all 74 moves as 100% content-preserving renames.
  • Records all 64 original-to-current test identities in the migration manifest.
  • Reduces the parser-backed JSX-in-.js baseline from 1,152 to 1,088 files.

Testing Instructions

  1. npm run test:unit -- packages/block-editor --runInBand
    • 133 suites passed, 2,132 tests passed, 17 snapshots passed.
  2. npm run --workspace @wordpress/unit-tests test:unit:routing
    • 996 baseline tests have exactly one runner and environment; 164 original test identities now map to renamed paths.
  3. npm run lint:jsx-extensions
    • Validates the 1,088-file remaining JSX-in-.js baseline.
  4. Commit-time formatting and strict JavaScript lint pass.

Testing Instructions for Keyboard

Not applicable; this changes test and snapshot filenames only.

Screenshots or screencast

Not applicable.

Use of AI Tools

This migration was implemented with Codex assistance. The rename identities, snapshot moves, diff, and verification output were reviewed before publication.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.76 MB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant