JS: Add trap test for import assertions

This commit is contained in:
Asger F
2023-03-01 15:30:06 +01:00
parent b6ec9464eb
commit 5fdc293d82
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import "module" assert { type: "json" };
import * as v1 from "module" assert { type: "json" };
import { v2 } from "module" assert { type: "json" };
import v3 from "module" assert { type: "json" };
export { v4 } from "module" assert { type: "json" };
export * from "module" assert { type: "json" };
export * as v5 from "module" assert { type: "json" };
const v6 = import("module", { assert: { type: "json" } });
import "module" // missing semicolon
assert({type: "json"}); // function call, not import assertion