Skip to content

Commit

Permalink
Add tests for babel/babel#12224
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Nov 6, 2020
1 parent 9aa1e78 commit 292c53c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
2 changes: 2 additions & 0 deletions tests/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -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";
================================================================================
Expand Down
1 change: 1 addition & 0 deletions tests/js/babel-plugins/module-string-names.js
@@ -1 +1,2 @@
import { "😄" as smile } from "./emojis.js";
export { smile as "😄" } from "./emojis.js";
20 changes: 19 additions & 1 deletion 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
Expand Down Expand Up @@ -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";
================================================================================
`;
3 changes: 3 additions & 0 deletions 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";
8 changes: 0 additions & 8 deletions tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/misc/errors/js/module-string-name-import.js

This file was deleted.

0 comments on commit 292c53c

Please sign in to comment.