Skip to content

Rename Editor JSX Test Files - #80973

Closed
ciampo wants to merge 1 commit into
codex/vitest-74-block-libraryfrom
codex/vitest-75-editor-jsx
Closed

Rename Editor JSX Test Files#80973
ciampo wants to merge 1 commit into
codex/vitest-74-block-libraryfrom
codex/vitest-75-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 25 remaining JSX-bearing Editor Jest tests from .js to .jsx, renames the three 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 25 Editor test files without changing their test behavior.
  • Renames three snapshot files to the paths Jest derives from the new .jsx test filenames. Each old/new snapshot pair was compared and is byte-identical.
  • Records all 25 original-to-current test identities in the migration manifest.
  • Reduces the parser-backed JSX-in-.js baseline from 1,177 to 1,152 files.
  • Reorders one pre-existing WordPress dependency import exposed by strict linting of the new .jsx path; no runtime or assertion behavior changes.

Testing Instructions

  1. npm run test:unit -- packages/editor --runInBand
    • 58 suites passed, 733 tests passed, 8 snapshots passed.
  2. npm run --workspace @wordpress/unit-tests test:unit:routing
    • 996 baseline tests have exactly one runner and environment; 100 original test identities now map to renamed paths.
  3. npm run lint:jsx-extensions
    • Validates the 1,152-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 hashes, 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

@ciampo ciampo closed this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant