summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/compat
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/compat')
-rw-r--r--cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs4
-rw-r--r--cli/tests/testdata/compat/worker/worker_test.mjs4
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs b/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs
index e94af67a4..b94033268 100644
--- a/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs
+++ b/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs
@@ -1,2 +1,2 @@
-const url = new URL("./imported.js", import.meta.url);
-await import(url.href);
+const url = import.meta.resolve("./imported.js");
+await import(url);
diff --git a/cli/tests/testdata/compat/worker/worker_test.mjs b/cli/tests/testdata/compat/worker/worker_test.mjs
index 7caf6196b..8613dde0c 100644
--- a/cli/tests/testdata/compat/worker/worker_test.mjs
+++ b/cli/tests/testdata/compat/worker/worker_test.mjs
@@ -1,8 +1,8 @@
import { deferred } from "../../../../../test_util/std/async/deferred.ts";
const promise = deferred();
-const url = new URL("./worker.mjs", import.meta.url);
-const worker = new Worker(url.href, { type: "module" });
+const url = import.meta.resolve("./worker.mjs");
+const worker = new Worker(url, { type: "module" });
worker.onmessage = (e) => {
const pid = e.data.pid;