Skip to content

Commit f1182e7

Browse files
committed
Add error test for module string name with import
1 parent 6452008 commit f1182e7

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

tests/misc/errors/js/__snapshots__/jsfmt.spec.js.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ exports[`module-attributes.js error test 1`] = `
1818
2 | "
1919
`;
2020

21+
exports[`module-string-name-import.js error test 1`] = `
22+
"Unexpected token (2:10)
23+
1 | // https://github.com/babel/babel/issues/12209
24+
> 2 | import { \\"foo\\" as foo } from \\"module-a\\";
25+
| ^
26+
3 | "
27+
`;
28+
2129
exports[`no-for-in-init-concise-binary-in.js error test 1`] = `
2230
"Unexpected token, expected \\")\\" (3:18)
2331
1 | // https://github.com/babel/babel/pull/11931
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// https://github.com/babel/babel/issues/12209
2+
import { "foo" as foo } from "module-a";

0 commit comments

Comments
 (0)