Skip to content

Commit eecf32d

Browse files
committed
Add tests for deprecated 'assert' syntax
1 parent 4192d09 commit eecf32d

File tree

2 files changed

+1777
-811
lines changed

2 files changed

+1777
-811
lines changed

javascript/extractor/tests/ts/input/import-assertion.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "module" with { type: "json" };
22
import * as v1 from "module" with { type: "json" };
33
import { v2 } from "module" with { type: "json" };
4-
import v3 from "module" assert { type: "json" };
4+
import v3 from "module" with { type: "json" };
55

66
export { v4 } from "module" with { type: "json" };
77
export * from "module" with { type: "json" };
@@ -11,3 +11,14 @@ const v6 = import("module", { "with": { type: "json" } });
1111

1212
import "module"; // missing semicolon
1313
assert({ type: "json" }); // function call, not import assertion
14+
15+
import "module" assert { type: "json" };
16+
import * as v1 from "module" assert { type: "json" };
17+
import { v2 } from "module" assert { type: "json" };
18+
import v3 from "module" assert { type: "json" };
19+
20+
export { v4 } from "module" assert { type: "json" };
21+
export * from "module" assert { type: "json" };
22+
export * as v5 from "module" assert { type: "json" };
23+
24+
const v6 = import("module", { assert: { type: "json" } });

0 commit comments

Comments
 (0)