Skip to content

Commit

Permalink
Add test for babel/babel#12249
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Nov 6, 2020
1 parent 1a2216d commit 08193c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -14,6 +14,24 @@ import("./foo.json", { assert: { type: "json" } });
================================================================================
`;

exports[`import-assertions-for-export.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
export { foo2 } from "foo.json" assert { type: "json" };
export * from "foo.json" assert { type: "json" };
export * as foo3 from "foo.json" assert { type: "json" };
=====================================output=====================================
export { foo2 } from "foo.json";
export * from "foo.json";
export * as foo3 from "foo.json";
================================================================================
`;

exports[`import-assertions-multi-types.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
Expand Down
3 changes: 3 additions & 0 deletions tests/js/import-assertions/import-assertions-for-export.js
@@ -0,0 +1,3 @@
export { foo2 } from "foo.json" assert { type: "json" };
export * from "foo.json" assert { type: "json" };
export * as foo3 from "foo.json" assert { type: "json" };
2 changes: 2 additions & 0 deletions tests/js/import-assertions/jsfmt.spec.js
Expand Up @@ -5,12 +5,14 @@ run_spec(__dirname, ["babel"], {
"import-assertions-multi-types.js",
"import-assertions-static.js",
"import-assertions-without-from.js",
"import-assertions-for-export.js",
],
meriyah: [
"import-assertions-dynamic.js",
"import-assertions-multi-types.js",
"import-assertions-static.js",
"import-assertions-without-from.js",
"import-assertions-for-export.js",
],
},
});

0 comments on commit 08193c5

Please sign in to comment.