Add tests for deprecated 'assert' syntax

This commit is contained in:
Arthur Baars
2023-10-10 12:14:25 +02:00
parent 4192d09e5c
commit eecf32db4d
2 changed files with 1777 additions and 811 deletions

View File

@@ -1,7 +1,7 @@
import "module" with { type: "json" };
import * as v1 from "module" with { type: "json" };
import { v2 } from "module" with { type: "json" };
import v3 from "module" assert { type: "json" };
import v3 from "module" with { type: "json" };
export { v4 } from "module" with { type: "json" };
export * from "module" with { type: "json" };
@@ -11,3 +11,14 @@ const v6 = import("module", { "with": { type: "json" } });
import "module"; // missing semicolon
assert({ type: "json" }); // function call, not import assertion
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" } });