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

Make tests spec compliant by avoiding duplicate declarations in input files #9522

Merged
merged 1 commit into from
Feb 19, 2019
Merged

Make tests spec compliant by avoiding duplicate declarations in input files #9522

merged 1 commit into from
Feb 19, 2019

Conversation

danez
Copy link
Member

@danez danez commented Feb 16, 2019

Q                       A
Fixed Issues?
Patch: Bug Fix? n
Major: Breaking Change? n
Minor: New Feature? n
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This does NOT change any real code, only test fixtures are change.
This changes make sure there are no duplicate declarations in any of the input.m?js files. I extracted this from #9493 as it can be already added independently and makes the review of #9493 easier.

For reviewing here the important part is that I did not change the meaning of any test by renaming stuff. This is the reason import type, { imp } from ""; was extracted into a separate file as it collides with import type from "";, but renaming type to something else would probably change the meaning.

There is some additional fixes see inline comments.

@danez danez added area: tests PR: Internal 🏠 A type of pull request used for our changelog categories labels Feb 16, 2019
@@ -65,7 +65,7 @@ describe("arrow function conversion", () => {
_supercall();
() => _supercall();
`,
{ methodName: "constructor" },
{ methodName: "constructor", extend: true },
Copy link
Member Author

@danez danez Feb 16, 2019

Choose a reason for hiding this comment

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

I think extend: true was missing here and not left out on purpose, even though all other tests in this file use it correctly.
super call requires the class to extend another class, so this would throw when #9493 gets merged

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 16, 2019

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

@@ -1 +0,0 @@
function null() { }
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1 +0,0 @@
function true() { }
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1 +0,0 @@
function false() { }
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1 +0,0 @@
function if() { }
Copy link
Member Author

Choose a reason for hiding this comment

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

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 16, 2019

You renamed a lot of function declarations: it doesn't really matter, but they can be duplicated, right?

@danez
Copy link
Member Author

danez commented Feb 16, 2019

in some cases yes, i just renamed all duplication in tests that were failing

@danez danez added this to In progress in Parser: Spec Compliance, Refactoring and Performance via automation Feb 18, 2019
@danez danez merged commit a1ea765 into babel:master Feb 19, 2019
Parser: Spec Compliance, Refactoring and Performance automation moved this from In progress to Done Feb 19, 2019
@danez danez deleted the spec-update-tests branch February 19, 2019 00:14
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants