Skip to content

Commit 5fdc293

Browse files
committed
JS: Add trap test for import assertions
1 parent b6ec946 commit 5fdc293

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import "module" assert { type: "json" };
2+
import * as v1 from "module" assert { type: "json" };
3+
import { v2 } from "module" assert { type: "json" };
4+
import v3 from "module" assert { type: "json" };
5+
6+
export { v4 } from "module" assert { type: "json" };
7+
export * from "module" assert { type: "json" };
8+
export * as v5 from "module" assert { type: "json" };
9+
10+
const v6 = import("module", { assert: { type: "json" } });
11+
12+
import "module" // missing semicolon
13+
assert({type: "json"}); // function call, not import assertion

javascript/extractor/tests/esnext/output/trap/import-assertion.js.trap

Whitespace-only changes.

0 commit comments

Comments
 (0)