summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-02-13 13:05:10 +1100
committerGitHub <noreply@github.com>2024-02-13 02:05:10 +0000
commit92f61882531a0dfa2bd57ab0804daec88721760b (patch)
tree29be9e4401437f842a0c4630781a3283d0ab6bb1 /tests/unit
parentd236fc8b434a997f3588f673c5841b18ebdd8086 (diff)
chore: use `@std` import instead of `@test_util/std` (#22398)
This PR: 1. Replaces `@test_util/std`-prefixed imports with `@std`. 2. Adds `@std/` import map entries to a few `deno.json` files.
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/blob_test.ts2
-rw-r--r--tests/unit/broadcast_channel_test.ts2
-rw-r--r--tests/unit/console_test.ts2
-rw-r--r--tests/unit/fetch_test.ts2
-rw-r--r--tests/unit/files_test.ts2
-rw-r--r--tests/unit/http_test.ts4
-rw-r--r--tests/unit/io_test.ts2
-rw-r--r--tests/unit/kv_test.ts2
-rw-r--r--tests/unit/message_channel_test.ts2
-rw-r--r--tests/unit/serve_test.ts4
-rw-r--r--tests/unit/test_util.ts12
-rw-r--r--tests/unit/tls_test.ts6
-rw-r--r--tests/unit/urlpattern_test.ts2
-rw-r--r--tests/unit/websocketstream_test.ts.disabled2
-rw-r--r--tests/unit/worker_test.ts2
15 files changed, 24 insertions, 24 deletions
diff --git a/tests/unit/blob_test.ts b/tests/unit/blob_test.ts
index e6623a65c..8be6b5d46 100644
--- a/tests/unit/blob_test.ts
+++ b/tests/unit/blob_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, assertStringIncludes } from "./test_util.ts";
-import { concat } from "@test_util/std/bytes/concat.ts";
+import { concat } from "@std/bytes/concat.ts";
Deno.test(function blobString() {
const b1 = new Blob(["Hello World"]);
diff --git a/tests/unit/broadcast_channel_test.ts b/tests/unit/broadcast_channel_test.ts
index c5d7f7e7f..7e4d55848 100644
--- a/tests/unit/broadcast_channel_test.ts
+++ b/tests/unit/broadcast_channel_test.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { assertEquals } from "@test_util/std/assert/mod.ts";
+import { assertEquals } from "@std/assert/mod.ts";
Deno.test("BroadcastChannel worker", async () => {
const intercom = new BroadcastChannel("intercom");
diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts
index 2f24b2c4e..3eee2c9ff 100644
--- a/tests/unit/console_test.ts
+++ b/tests/unit/console_test.ts
@@ -14,7 +14,7 @@ import {
assertStringIncludes,
assertThrows,
} from "./test_util.ts";
-import { stripColor } from "@test_util/std/fmt/colors.ts";
+import { stripColor } from "@std/fmt/colors.ts";
const customInspect = Symbol.for("Deno.customInspect");
const {
diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts
index 80837a456..dc596718f 100644
--- a/tests/unit/fetch_test.ts
+++ b/tests/unit/fetch_test.ts
@@ -8,7 +8,7 @@ import {
fail,
unimplemented,
} from "./test_util.ts";
-import { Buffer } from "@test_util/std/io/buffer.ts";
+import { Buffer } from "@std/io/buffer.ts";
const listenPort = 4506;
diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts
index c29092963..47fa03ddd 100644
--- a/tests/unit/files_test.ts
+++ b/tests/unit/files_test.ts
@@ -8,7 +8,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
-import { copy } from "@test_util/std/streams/copy.ts";
+import { copy } from "@std/streams/copy.ts";
Deno.test(function filesStdioFileDescriptors() {
assertEquals(Deno.stdin.rid, 0);
diff --git a/tests/unit/http_test.ts b/tests/unit/http_test.ts
index 17023004e..108c43e40 100644
--- a/tests/unit/http_test.ts
+++ b/tests/unit/http_test.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { Buffer, BufReader, BufWriter } from "@test_util/std/io/mod.ts";
+import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
@@ -10,7 +10,7 @@ import {
delay,
fail,
} from "./test_util.ts";
-import { join } from "@test_util/std/path/mod.ts";
+import { join } from "@std/path/mod.ts";
const listenPort = 4507;
const listenPort2 = 4508;
diff --git a/tests/unit/io_test.ts b/tests/unit/io_test.ts
index 04c9dab4b..aadb82297 100644
--- a/tests/unit/io_test.ts
+++ b/tests/unit/io_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "./test_util.ts";
-import { Buffer } from "@test_util/std/io/buffer.ts";
+import { Buffer } from "@std/io/buffer.ts";
const DEFAULT_BUF_SIZE = 32 * 1024;
diff --git a/tests/unit/kv_test.ts b/tests/unit/kv_test.ts
index 5780d9900..42914cccd 100644
--- a/tests/unit/kv_test.ts
+++ b/tests/unit/kv_test.ts
@@ -7,7 +7,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
-import { assertType, IsExact } from "@test_util/std/testing/types.ts";
+import { assertType, IsExact } from "@std/testing/types.ts";
const sleep = (time: number) => new Promise((r) => setTimeout(r, time));
diff --git a/tests/unit/message_channel_test.ts b/tests/unit/message_channel_test.ts
index 88fb1ba11..87023bb1f 100644
--- a/tests/unit/message_channel_test.ts
+++ b/tests/unit/message_channel_test.ts
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// NOTE: these are just sometests to test the TypeScript types. Real coverage is
// provided by WPT.
-import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
+import { assert, assertEquals } from "@std/assert/mod.ts";
Deno.test("messagechannel", async () => {
const mc = new MessageChannel();
diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts
index e972b36cd..5d83aa5fc 100644
--- a/tests/unit/serve_test.ts
+++ b/tests/unit/serve_test.ts
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { assertMatch, assertRejects } from "@test_util/std/assert/mod.ts";
-import { Buffer, BufReader, BufWriter } from "@test_util/std/io/mod.ts";
+import { assertMatch, assertRejects } from "@std/assert/mod.ts";
+import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
diff --git a/tests/unit/test_util.ts b/tests/unit/test_util.ts
index 2f2730794..c73f52b15 100644
--- a/tests/unit/test_util.ts
+++ b/tests/unit/test_util.ts
@@ -1,8 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import * as colors from "@test_util/std/fmt/colors.ts";
+import * as colors from "@std/fmt/colors.ts";
export { colors };
-import { join, resolve } from "@test_util/std/path/mod.ts";
+import { join, resolve } from "@std/path/mod.ts";
export {
assert,
assertEquals,
@@ -19,10 +19,10 @@ export {
fail,
unimplemented,
unreachable,
-} from "@test_util/std/assert/mod.ts";
-export { delay } from "@test_util/std/async/delay.ts";
-export { readLines } from "@test_util/std/io/read_lines.ts";
-export { parse as parseArgs } from "@test_util/std/flags/mod.ts";
+} from "@std/assert/mod.ts";
+export { delay } from "@std/async/delay.ts";
+export { readLines } from "@std/io/read_lines.ts";
+export { parse as parseArgs } from "@std/flags/mod.ts";
export function pathToAbsoluteFileUrl(path: string): URL {
path = resolve(path);
diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts
index 2bd7768bb..0ad69d3e4 100644
--- a/tests/unit/tls_test.ts
+++ b/tests/unit/tls_test.ts
@@ -7,9 +7,9 @@ import {
assertStrictEquals,
assertThrows,
} from "./test_util.ts";
-import { BufReader, BufWriter } from "@test_util/std/io/mod.ts";
-import { readAll } from "@test_util/std/streams/read_all.ts";
-import { writeAll } from "@test_util/std/streams/write_all.ts";
+import { BufReader, BufWriter } from "@std/io/mod.ts";
+import { readAll } from "@std/streams/read_all.ts";
+import { writeAll } from "@std/streams/write_all.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
const encoder = new TextEncoder();
diff --git a/tests/unit/urlpattern_test.ts b/tests/unit/urlpattern_test.ts
index 7730dbe40..2b635a513 100644
--- a/tests/unit/urlpattern_test.ts
+++ b/tests/unit/urlpattern_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "./test_util.ts";
-import { assertType, IsExact } from "@test_util/std/testing/types.ts";
+import { assertType, IsExact } from "@std/testing/types.ts";
Deno.test(function urlPatternFromString() {
const pattern = new URLPattern("https://deno.land/foo/:bar");
diff --git a/tests/unit/websocketstream_test.ts.disabled b/tests/unit/websocketstream_test.ts.disabled
index eaedb71bd..19941e08e 100644
--- a/tests/unit/websocketstream_test.ts.disabled
+++ b/tests/unit/websocketstream_test.ts.disabled
@@ -6,7 +6,7 @@ import {
assertRejects,
assertThrows,
unreachable,
-} from "@test_util/std/assert/mod.ts";
+} from "@std/assert/mod.ts";
Deno.test("fragment", () => {
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
diff --git a/tests/unit/worker_test.ts b/tests/unit/worker_test.ts
index eea0e8106..33e25f70e 100644
--- a/tests/unit/worker_test.ts
+++ b/tests/unit/worker_test.ts
@@ -7,7 +7,7 @@ import {
assertEquals,
assertMatch,
assertThrows,
-} from "@test_util/std/assert/mod.ts";
+} from "@std/assert/mod.ts";
function resolveWorker(worker: string): string {
return import.meta.resolve(`../testdata/workers/${worker}`);