diff --git a/tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap index 26bfa6f5f464..41582d2342a6 100644 --- a/tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap @@ -851,9 +851,11 @@ parsers: ["babel", "babel-ts", "babel-flow"] printWidth: 80 | printWidth =====================================input====================================== +import { "😄" as smile } from "./emojis.js"; export { smile as "😄" } from "./emojis.js"; =====================================output===================================== +import { "😄" as smile } from "./emojis.js"; export { smile as "😄" } from "./emojis.js"; ================================================================================ diff --git a/tests/js/babel-plugins/module-string-names.js b/tests/js/babel-plugins/module-string-names.js index 631c04f79793..2bdb75fb7037 100644 --- a/tests/js/babel-plugins/module-string-names.js +++ b/tests/js/babel-plugins/module-string-names.js @@ -1 +1,2 @@ +import { "😄" as smile } from "./emojis.js"; export { smile as "😄" } from "./emojis.js"; diff --git a/tests/js/module-string-names/__snapshots__/jsfmt.spec.js.snap b/tests/js/module-string-names/__snapshots__/jsfmt.spec.js.snap index b2f9e1c02d49..d94cc0445628 100644 --- a/tests/js/module-string-names/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/module-string-names/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`module-string-names.js format 1`] = ` +exports[`module-string-names-export.js format 1`] = ` ====================================options===================================== parsers: ["babel"] printWidth: 80 @@ -30,3 +30,21 @@ export { "smile" } from "./emojis.js"; ================================================================================ `; + +exports[`module-string-names-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { "default" as quotation } from "Confucius"; +import { "foo" as bar, "default" as qux } from "module-a"; +import { "學而時習之,不亦說乎?" as quotation } from "Confucius"; + +=====================================output===================================== +import { "default" as quotation } from "Confucius"; +import { "foo" as bar, "default" as qux } from "module-a"; +import { "學而時習之,不亦說乎?" as quotation } from "Confucius"; + +================================================================================ +`; diff --git a/tests/js/module-string-names/module-string-names.js b/tests/js/module-string-names/module-string-names-export.js similarity index 100% rename from tests/js/module-string-names/module-string-names.js rename to tests/js/module-string-names/module-string-names-export.js diff --git a/tests/js/module-string-names/module-string-names-import.js b/tests/js/module-string-names/module-string-names-import.js new file mode 100644 index 000000000000..84ca0d81bcec --- /dev/null +++ b/tests/js/module-string-names/module-string-names-import.js @@ -0,0 +1,3 @@ +import { "default" as quotation } from "Confucius"; +import { "foo" as bar, "default" as qux } from "module-a"; +import { "學而時習之,不亦說乎?" as quotation } from "Confucius"; diff --git a/tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap b/tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap index 5354a8b1c146..d6f2725153ea 100644 --- a/tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap +++ b/tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap @@ -25,14 +25,6 @@ exports[`module-attributes.js error test 1`] = ` 2 | " `; -exports[`module-string-name-import.js error test 1`] = ` -"Unexpected token (2:10) - 1 | // https://github.com/babel/babel/issues/12209 -> 2 | import { \\"foo\\" as foo } from \\"module-a\\"; - | ^ - 3 | " -`; - exports[`no-for-in-init-concise-binary-in.js error test 1`] = ` "Unexpected token, expected \\")\\" (3:18) 1 | // https://github.com/babel/babel/pull/11931 diff --git a/tests/misc/errors/js/module-string-name-import.js b/tests/misc/errors/js/module-string-name-import.js deleted file mode 100644 index 53167a0d5443..000000000000 --- a/tests/misc/errors/js/module-string-name-import.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://github.com/babel/babel/issues/12209 -import { "foo" as foo } from "module-a";