Reorganize some JSX-related tests #12502
Merged
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.
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. BothnextReact
andnextReactClassic
had mainly the same tests that were already in thereact
directory.What has been done:
nextReactClassic
dir and not in thereact
dir and just moved those extras to thereact
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.nextReactClassic
completely as those tests are IMHO already covered by thereact
directorynextReact
toreact-automatic
(in Babel 8 the names probably should be switch,react
should becomereact-classic
andreact-automatic
should become justreact
). I've decided to keep this directory - it tests pretty much the same thing asreact
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.nextAutoImport
toautoImport
- this seems like its own category of tests, so worth keeping them separately@babel/transform-react-display-name
to its package - I think it makes more sense to keep them there than in the main package.