Skip to content
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

Reorganize some JSX-related tests #12502

Merged
merged 1 commit into from Dec 14, 2020
Merged

Reorganize some JSX-related tests #12502

merged 1 commit into from Dec 14, 2020

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Dec 14, 2020

After switching completely to the -experimental helper the current directories didn't make sense in some cases. next* directories were responsible for testing the -experimental helper because it was complete overwrite of the implementation - this made sense at the time they have been introduced. Both nextReact and nextReactClassic had mainly the same tests that were already in the react directory.

What has been done:

  1. I've recognized which tests were in the nextReactClassic dir and not in the react dir and just moved those extras to the react dir. Note: nextReactClassic was actually using automatic runtime through an option (to opt into the -experimental helper) and "switched back" to the classic runtime through a @jsxRuntime pragma. I don't think this was an important distinction so the moved tests just use the classic runtime through a default option.
  2. I've removed the nextReactClassic completely as those tests are IMHO already covered by the react directory
  3. I've renamed nextReact to react-automatic (in Babel 8 the names probably should be switch, react should become react-classic and react-automatic should become just react). I've decided to keep this directory - it tests pretty much the same thing as react dir - just with the automatic runtime. It really shouldn't matter much and if I would implement this from scratch I probably wouldn't duplicate those tests for both runtimes but as we already have them I don't think it's worth removing them.
  4. I've renamed nextAutoImport to autoImport - this seems like its own category of tests, so worth keeping them separately
  5. I've moved tests related to @babel/transform-react-display-name to its package - I think it makes more sense to keep them there than in the main package.

@Andarist Andarist added PR: Internal 🏠 A type of pull request used for our changelog categories PR: Polish 💅 A type of pull request used for our changelog categories area: react area: jsx labels Dec 14, 2020
@nicolo-ribaudo nicolo-ribaudo added area: tests and removed PR: Polish 💅 A type of pull request used for our changelog categories labels Dec 14, 2020
@babel-bot
Copy link
Collaborator

babel-bot commented Dec 14, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/35134/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 14, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a801335:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit 581aeb9 into main Dec 14, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the jsx-tests-cleanup branch December 14, 2020 23:02
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 16, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: jsx area: react area: tests outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants