summaryrefslogtreecommitdiff
path: root/tests/testdata
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-04-30 05:43:05 +0900
committerGitHub <noreply@github.com>2024-04-29 22:43:05 +0200
commit783533d2e354ad73356d7517b26293e48c10fc17 (patch)
tree68bd0fa01c59ab9c4ad6d2010fabb9babf6d8d85 /tests/testdata
parent4384a126bb759580777e7a2678fe49bb015f2f69 (diff)
FUTURE: remove import assertions support for JavaScript (#23541)
Ref #17944, https://github.com/swc-project/swc/issues/8893 TypeScript removes the `assert` keywords in the transpile, so this PR only works for JavaScript files
Diffstat (limited to 'tests/testdata')
-rw-r--r--tests/testdata/npm/import_json/main.js2
-rw-r--r--tests/testdata/run/deno_futures_env.ts3
-rw-r--r--tests/testdata/subdir/mod7.js2
-rw-r--r--tests/testdata/subdir/mod8.js2
4 files changed, 3 insertions, 6 deletions
diff --git a/tests/testdata/npm/import_json/main.js b/tests/testdata/npm/import_json/main.js
index b752bdef8..ac6cee9a8 100644
--- a/tests/testdata/npm/import_json/main.js
+++ b/tests/testdata/npm/import_json/main.js
@@ -1,4 +1,4 @@
-import json from "npm:@denotest/binary-package@1/package.json" assert {
+import json from "npm:@denotest/binary-package@1/package.json" with {
type: "json",
};
console.log(json);
diff --git a/tests/testdata/run/deno_futures_env.ts b/tests/testdata/run/deno_futures_env.ts
deleted file mode 100644
index 21f76e367..000000000
--- a/tests/testdata/run/deno_futures_env.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-if (typeof window !== "undefined") {
- throw new Error("Window global available");
-}
diff --git a/tests/testdata/subdir/mod7.js b/tests/testdata/subdir/mod7.js
index 2bd4b5eb7..e71ced92e 100644
--- a/tests/testdata/subdir/mod7.js
+++ b/tests/testdata/subdir/mod7.js
@@ -1,3 +1,3 @@
-import json1 from "./json_1.json" assert { type: "json" };
+import json1 from "./json_1.json" with { type: "json" };
console.log(json1);
diff --git a/tests/testdata/subdir/mod8.js b/tests/testdata/subdir/mod8.js
index 5bf7a49a8..ed41d992c 100644
--- a/tests/testdata/subdir/mod8.js
+++ b/tests/testdata/subdir/mod8.js
@@ -1,3 +1,3 @@
-import json3 from "./json_3.json" assert { type: "json" };
+import json3 from "./json_3.json" with { type: "json" };
console.log(json3);