summaryrefslogtreecommitdiff
path: root/tests/testdata/run
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-07-25 10:26:54 +1000
committerGitHub <noreply@github.com>2024-07-25 10:26:54 +1000
commitf248050cb467eaed8d65428b8808254e26797cc5 (patch)
tree7e43f16a8754a6313f65f0f65c037fdae2ce986f /tests/testdata/run
parent795ed23b356dc044cfb497a6189d588604a6c335 (diff)
chore: use `@std` prefix for internal module specifiers (#24543)
This change aims to replace all relative import specifiers targeted at `tests/util/std` with mapped ones (using a `deno.json` file). Towards updating the `std` git submodule.
Diffstat (limited to 'tests/testdata/run')
-rw-r--r--tests/testdata/run/import_meta/importmap.json2
-rw-r--r--tests/testdata/run/import_meta/main.ts2
-rw-r--r--tests/testdata/run/onload/imported.ts2
-rw-r--r--tests/testdata/run/onload/main.ts2
-rw-r--r--tests/testdata/run/onload/nest_imported.ts2
-rw-r--r--tests/testdata/run/textproto.ts7
-rw-r--r--tests/testdata/run/tls_connecttls.js4
-rw-r--r--tests/testdata/run/tls_starttls.js6
-rw-r--r--tests/testdata/run/websocket_server_idletimeout.ts2
9 files changed, 14 insertions, 15 deletions
diff --git a/tests/testdata/run/import_meta/importmap.json b/tests/testdata/run/import_meta/importmap.json
index d85fe3028..7d583dd81 100644
--- a/tests/testdata/run/import_meta/importmap.json
+++ b/tests/testdata/run/import_meta/importmap.json
@@ -1,5 +1,7 @@
{
"imports": {
+ "@std/": "../../../util/std/",
+
"bare": "https://example.com/",
"https://example.com/rewrite": "https://example.com/rewritten",
diff --git a/tests/testdata/run/import_meta/main.ts b/tests/testdata/run/import_meta/main.ts
index 384a9232e..6e4d5be98 100644
--- a/tests/testdata/run/import_meta/main.ts
+++ b/tests/testdata/run/import_meta/main.ts
@@ -1,4 +1,4 @@
-import { assertThrows } from "../../../../tests/util/std/assert/mod.ts";
+import { assertThrows } from "@std/assert/mod.ts";
import "http://localhost:4545/run/import_meta/other.ts";
import "./other.ts";
diff --git a/tests/testdata/run/onload/imported.ts b/tests/testdata/run/onload/imported.ts
index 5c412bd43..38649b9b3 100644
--- a/tests/testdata/run/onload/imported.ts
+++ b/tests/testdata/run/onload/imported.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
-import { assert } from "../../../../tests/util/std/assert/mod.ts";
+import { assert } from "@std/assert/mod.ts";
import "./nest_imported.ts";
const handler = (e: Event) => {
diff --git a/tests/testdata/run/onload/main.ts b/tests/testdata/run/onload/main.ts
index e3eae99fa..c0e120d96 100644
--- a/tests/testdata/run/onload/main.ts
+++ b/tests/testdata/run/onload/main.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix no-prototype-builtins
-import { assert } from "../../../../tests/util/std/assert/mod.ts";
+import { assert } from "@std/assert/mod.ts";
import "./imported.ts";
assert(window.hasOwnProperty("onload"));
diff --git a/tests/testdata/run/onload/nest_imported.ts b/tests/testdata/run/onload/nest_imported.ts
index 61af36e0a..98775d943 100644
--- a/tests/testdata/run/onload/nest_imported.ts
+++ b/tests/testdata/run/onload/nest_imported.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
-import { assert } from "../../../../tests/util/std/assert/mod.ts";
+import { assert } from "@std/assert/mod.ts";
const handler = (e: Event) => {
assert(e.type === "beforeunload" ? e.cancelable : !e.cancelable);
diff --git a/tests/testdata/run/textproto.ts b/tests/testdata/run/textproto.ts
index f35ab6734..d1b667c15 100644
--- a/tests/testdata/run/textproto.ts
+++ b/tests/testdata/run/textproto.ts
@@ -14,11 +14,8 @@
* @module
*/
-import type {
- BufReader,
- ReadLineResult,
-} from "../../../tests/util/std/io/buf_reader.ts";
-import { concat } from "../../../tests/util/std/bytes/concat.ts";
+import type { BufReader, ReadLineResult } from "@std/io/buf_reader.ts";
+import { concat } from "@std/bytes/concat.ts";
// Constants created for DRY
const CHAR_SPACE: number = " ".charCodeAt(0);
diff --git a/tests/testdata/run/tls_connecttls.js b/tests/testdata/run/tls_connecttls.js
index b3cc3f339..540dd5721 100644
--- a/tests/testdata/run/tls_connecttls.js
+++ b/tests/testdata/run/tls_connecttls.js
@@ -1,5 +1,5 @@
-import { assert, assertEquals } from "../../../tests/util/std/assert/mod.ts";
-import { BufReader, BufWriter } from "../../../tests/util/std/io/mod.ts";
+import { assert, assertEquals } from "@std/assert/mod.ts";
+import { BufReader, BufWriter } from "@std/io/mod.ts";
import { TextProtoReader } from "./textproto.ts";
const encoder = new TextEncoder();
diff --git a/tests/testdata/run/tls_starttls.js b/tests/testdata/run/tls_starttls.js
index ebe0d0725..eb550d9be 100644
--- a/tests/testdata/run/tls_starttls.js
+++ b/tests/testdata/run/tls_starttls.js
@@ -1,6 +1,6 @@
-import { assert, assertEquals } from "../../../tests/util/std/assert/mod.ts";
-import { BufReader } from "../../../tests/util/std/io/buf_reader.ts";
-import { BufWriter } from "../../../tests/util/std/io/buf_writer.ts";
+import { assert, assertEquals } from "@std/assert/mod.ts";
+import { BufReader } from "@std/io/buf_reader.ts";
+import { BufWriter } from "@std/io/buf_writer.ts";
import { TextProtoReader } from "./textproto.ts";
const encoder = new TextEncoder();
diff --git a/tests/testdata/run/websocket_server_idletimeout.ts b/tests/testdata/run/websocket_server_idletimeout.ts
index 82a35605a..aa1da5ccd 100644
--- a/tests/testdata/run/websocket_server_idletimeout.ts
+++ b/tests/testdata/run/websocket_server_idletimeout.ts
@@ -1,4 +1,4 @@
-import { assertEquals } from "../../../tests/util/std/assert/mod.ts";
+import { assertEquals } from "@std/assert/mod.ts";
const errorDeferred = Promise.withResolvers<void>();
const closeDeferred = Promise.withResolvers<void>();