summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
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/buffer_test.ts2
-rw-r--r--tests/unit/console_test.ts141
-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.ts14
-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.ts7
16 files changed, 98 insertions, 98 deletions
diff --git a/tests/unit/blob_test.ts b/tests/unit/blob_test.ts
index b05b5fb7c..b57825314 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 "@std/bytes/concat.ts";
+import { concat } from "@std/bytes/concat";
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 7e4d55848..dce5f1086 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 "@std/assert/mod.ts";
+import { assertEquals } from "@std/assert";
Deno.test("BroadcastChannel worker", async () => {
const intercom = new BroadcastChannel("intercom");
diff --git a/tests/unit/buffer_test.ts b/tests/unit/buffer_test.ts
index 6d2123622..221574882 100644
--- a/tests/unit/buffer_test.ts
+++ b/tests/unit/buffer_test.ts
@@ -11,7 +11,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
-import { writeAllSync } from "@std/io/write_all.ts";
+import { writeAllSync } from "@std/io/write-all";
const MAX_SIZE = 2 ** 32 - 2;
// N controls how many iterations of certain checks are performed.
diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts
index 4c9378bd4..957ad3ef9 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 "@std/fmt/colors.ts";
+import { stripAnsiCode } from "@std/fmt/colors";
const customInspect = Symbol.for("Deno.customInspect");
const {
@@ -27,7 +27,7 @@ const {
} = Deno[Deno.internal];
function stringify(...args: unknown[]): string {
- return stripColor(inspectArgs(args).replace(/\n$/, ""));
+ return stripAnsiCode(inspectArgs(args).replace(/\n$/, ""));
}
interface Css {
@@ -372,7 +372,7 @@ Deno.test(function consoleTestStringifyCircular() {
}`,
);
// test inspect is working the same
- assertEquals(stripColor(Deno.inspect(nestedObj)), nestedObjExpected);
+ assertEquals(stripAnsiCode(Deno.inspect(nestedObj)), nestedObjExpected);
});
Deno.test(function consoleTestStringifyMultipleCircular() {
@@ -451,7 +451,7 @@ Deno.test(function consoleTestStringifyFunctionWithProperties() {
);
assertEquals(
- stripColor(Deno.inspect(Array, { showHidden: true })),
+ stripAnsiCode(Deno.inspect(Array, { showHidden: true })),
`<ref *1> [Function: Array] {
[length]: 1,
[name]: "Array",
@@ -529,24 +529,24 @@ Deno.test(function consoleTestStringifyWithDepth() {
// deno-lint-ignore no-explicit-any
const nestedObj: any = { a: { b: { c: { d: { e: { f: 42 } } } } } };
assertEquals(
- stripColor(inspectArgs([nestedObj], { depth: 3 })),
+ stripAnsiCode(inspectArgs([nestedObj], { depth: 3 })),
"{\n a: { b: { c: { d: [Object] } } }\n}",
);
assertEquals(
- stripColor(inspectArgs([nestedObj], { depth: 4 })),
+ stripAnsiCode(inspectArgs([nestedObj], { depth: 4 })),
"{\n a: {\n b: { c: { d: { e: [Object] } } }\n }\n}",
);
assertEquals(
- stripColor(inspectArgs([nestedObj], { depth: 0 })),
+ stripAnsiCode(inspectArgs([nestedObj], { depth: 0 })),
"{ a: [Object] }",
);
assertEquals(
- stripColor(inspectArgs([nestedObj])),
+ stripAnsiCode(inspectArgs([nestedObj])),
"{\n a: {\n b: { c: { d: { e: [Object] } } }\n }\n}",
);
// test inspect is working the same way
assertEquals(
- stripColor(Deno.inspect(nestedObj, { depth: 4 })),
+ stripAnsiCode(Deno.inspect(nestedObj, { depth: 4 })),
"{\n a: {\n b: { c: { d: { e: [Object] } } }\n }\n}",
);
});
@@ -1032,11 +1032,13 @@ Deno.test(function consoleTestIteratorValueAreNotConsumed() {
Deno.test(function consoleTestWeakSetAndWeakMapWithShowHidden() {
assertEquals(
- stripColor(Deno.inspect(new WeakSet([{}]), { showHidden: true })),
+ stripAnsiCode(Deno.inspect(new WeakSet([{}]), { showHidden: true })),
"WeakSet { {} }",
);
assertEquals(
- stripColor(Deno.inspect(new WeakMap([[{}, "foo"]]), { showHidden: true })),
+ stripAnsiCode(
+ Deno.inspect(new WeakMap([[{}, "foo"]]), { showHidden: true }),
+ ),
'WeakMap { {} => "foo" }',
);
});
@@ -1195,7 +1197,10 @@ Deno.test(function consoleTestWithObjectFormatSpecifier() {
Deno.test(function consoleTestWithStyleSpecifier() {
assertEquals(stringify("%cfoo%cbar"), "%cfoo%cbar");
assertEquals(stringify("%cfoo%cbar", ""), "foo%cbar");
- assertEquals(stripColor(stringify("%cfoo%cbar", "", "color: red")), "foobar");
+ assertEquals(
+ stripAnsiCode(stringify("%cfoo%cbar", "", "color: red")),
+ "foobar",
+ );
});
Deno.test(function consoleParseCssColor() {
@@ -1532,7 +1537,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table({ a: "test", b: 1 });
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬────────┐
│ (idx) │ Values │
@@ -1546,7 +1551,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table({ a: { b: 10 }, b: { b: 20, c: 30 } }, ["c"]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬────┐
│ (idx) │ c │
@@ -1560,7 +1565,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table([[1, 1], [234, 2.34], [56789, 56.789]]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───────┬────────┐
│ (idx) │ 0 │ 1 │
@@ -1575,7 +1580,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table([1, 2, [3, [4]], [5, 6], [[7], [8]]]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───────┬───────┬────────┐
│ (idx) │ 0 │ 1 │ Values │
@@ -1592,7 +1597,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table(new Set([1, 2, 3, "test"]));
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌────────────┬────────┐
│ (iter idx) │ Values │
@@ -1613,7 +1618,7 @@ Deno.test(function consoleTable() {
]),
);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌────────────┬─────┬────────┐
│ (iter idx) │ Key │ Values │
@@ -1633,7 +1638,7 @@ Deno.test(function consoleTable() {
h: new Map([[1, "one"]]),
});
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───────────┬────────────────────┬────────┐
│ (idx) │ c │ e │ Values │
@@ -1656,7 +1661,7 @@ Deno.test(function consoleTable() {
["test", { b: 20, c: "test" }],
]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬────────┬──────────────────────┬────┬────────┐
│ (idx) │ 0 │ 1 │ a │ Values │
@@ -1673,7 +1678,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table([]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┐
│ (idx) │
@@ -1685,7 +1690,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table({});
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┐
│ (idx) │
@@ -1697,7 +1702,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table(new Set());
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌────────────┐
│ (iter idx) │
@@ -1709,7 +1714,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table(new Map());
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌────────────┐
│ (iter idx) │
@@ -1725,7 +1730,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table(["Hello", "你好", "Amapá"]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬─────────┐
│ (idx) │ Values │
@@ -1743,7 +1748,7 @@ Deno.test(function consoleTable() {
[3, 4],
]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───┬───┐
│ (idx) │ 0 │ 1 │
@@ -1757,7 +1762,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table({ 1: { a: 4, b: 5 }, 2: null, 3: { b: 6, c: 7 } }, ["b"]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───┐
│ (idx) │ b │
@@ -1772,7 +1777,7 @@ Deno.test(function consoleTable() {
mockConsole((console, out) => {
console.table([{ a: 0 }, { a: 1, b: 1 }, { a: 2 }, { a: 3, b: 3 }]);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───┬───┐
│ (idx) │ a │ b │
@@ -1791,7 +1796,7 @@ Deno.test(function consoleTable() {
["a", "b", "c"],
);
assertEquals(
- stripColor(out.toString()),
+ stripAnsiCode(out.toString()),
`\
┌───────┬───┬───┬───┐
│ (idx) │ a │ b │ c │
@@ -1829,7 +1834,7 @@ Deno.test(function consoleLogShouldNotThrowError() {
Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidCssColorsAreGiven() {
mockConsole((console, out) => {
console.log("%cfoo", "color: foo; background-color: bar;");
- assertEquals(stripColor(out.toString()), "foo\n");
+ assertEquals(stripAnsiCode(out.toString()), "foo\n");
});
});
@@ -1838,7 +1843,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidDateIsPassed() {
mockConsole((console, out) => {
const invalidDate = new Date("test");
console.log(invalidDate);
- assertEquals(stripColor(out.toString()), "Invalid Date\n");
+ assertEquals(stripAnsiCode(out.toString()), "Invalid Date\n");
});
});
@@ -1847,7 +1852,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedSet() {
mockConsole((console, out) => {
const proxiedSet = new Proxy(new Set([1, 2]), {});
console.log(proxiedSet);
- assertEquals(stripColor(out.toString()), "Set(2) { 1, 2 }\n");
+ assertEquals(stripAnsiCode(out.toString()), "Set(2) { 1, 2 }\n");
});
});
@@ -1856,7 +1861,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedMap() {
mockConsole((console, out) => {
const proxiedMap = new Proxy(new Map([[1, 1], [2, 2]]), {});
console.log(proxiedMap);
- assertEquals(stripColor(out.toString()), "Map(2) { 1 => 1, 2 => 2 }\n");
+ assertEquals(stripAnsiCode(out.toString()), "Map(2) { 1 => 1, 2 => 2 }\n");
});
});
@@ -1865,7 +1870,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedTypedArray() {
mockConsole((console, out) => {
const proxiedUint8Array = new Proxy(new Uint8Array([1, 2]), {});
console.log(proxiedUint8Array);
- assertEquals(stripColor(out.toString()), "Uint8Array(2) [ 1, 2 ]\n");
+ assertEquals(stripAnsiCode(out.toString()), "Uint8Array(2) [ 1, 2 ]\n");
});
});
@@ -1874,7 +1879,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedRegExp() {
mockConsole((console, out) => {
const proxiedRegExp = new Proxy(/aaaa/, {});
console.log(proxiedRegExp);
- assertEquals(stripColor(out.toString()), "/aaaa/\n");
+ assertEquals(stripAnsiCode(out.toString()), "/aaaa/\n");
});
});
@@ -1883,7 +1888,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedDate() {
mockConsole((console, out) => {
const proxiedDate = new Proxy(new Date("2022-09-24T15:59:39.529Z"), {});
console.log(proxiedDate);
- assertEquals(stripColor(out.toString()), "2022-09-24T15:59:39.529Z\n");
+ assertEquals(stripAnsiCode(out.toString()), "2022-09-24T15:59:39.529Z\n");
});
});
@@ -1892,7 +1897,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInputIsProxiedError() {
mockConsole((console, out) => {
const proxiedError = new Proxy(new Error("message"), {});
console.log(proxiedError);
- assertStringIncludes(stripColor(out.toString()), "Error: message\n");
+ assertStringIncludes(stripAnsiCode(out.toString()), "Error: message\n");
});
});
@@ -1931,18 +1936,18 @@ Deno.test(function consoleTrace() {
Deno.test(function inspectString() {
assertEquals(
- stripColor(Deno.inspect("\0")),
+ stripAnsiCode(Deno.inspect("\0")),
`"\\x00"`,
);
assertEquals(
- stripColor(Deno.inspect("\x1b[2J")),
+ stripAnsiCode(Deno.inspect("\x1b[2J")),
`"\\x1b[2J"`,
);
});
Deno.test(function inspectGetters() {
assertEquals(
- stripColor(Deno.inspect({
+ stripAnsiCode(Deno.inspect({
get foo() {
return 0;
},
@@ -1951,7 +1956,7 @@ Deno.test(function inspectGetters() {
);
assertEquals(
- stripColor(Deno.inspect({
+ stripAnsiCode(Deno.inspect({
get foo() {
return 0;
},
@@ -1976,15 +1981,15 @@ Deno.test(function inspectPrototype() {
Deno.test(function inspectSorted() {
assertEquals(
- stripColor(Deno.inspect({ b: 2, a: 1 }, { sorted: true })),
+ stripAnsiCode(Deno.inspect({ b: 2, a: 1 }, { sorted: true })),
"{ a: 1, b: 2 }",
);
assertEquals(
- stripColor(Deno.inspect(new Set(["b", "a"]), { sorted: true })),
+ stripAnsiCode(Deno.inspect(new Set(["b", "a"]), { sorted: true })),
`Set(2) { "a", "b" }`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Map([
["b", 2],
["a", 1],
@@ -1997,7 +2002,7 @@ Deno.test(function inspectSorted() {
Deno.test(function inspectTrailingComma() {
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
[
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
@@ -2010,7 +2015,7 @@ Deno.test(function inspectTrailingComma() {
]`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
{
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: 1,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb: 2,
@@ -2023,7 +2028,7 @@ Deno.test(function inspectTrailingComma() {
}`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Set([
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
@@ -2036,7 +2041,7 @@ Deno.test(function inspectTrailingComma() {
}`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Map([
["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 1],
["bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", 2],
@@ -2052,7 +2057,7 @@ Deno.test(function inspectTrailingComma() {
Deno.test(function inspectCompact() {
assertEquals(
- stripColor(Deno.inspect({ a: 1, b: 2 }, { compact: false })),
+ stripAnsiCode(Deno.inspect({ a: 1, b: 2 }, { compact: false })),
`{
a: 1,
b: 2
@@ -2062,15 +2067,15 @@ Deno.test(function inspectCompact() {
Deno.test(function inspectIterableLimit() {
assertEquals(
- stripColor(Deno.inspect(["a", "b", "c"], { iterableLimit: 2 })),
+ stripAnsiCode(Deno.inspect(["a", "b", "c"], { iterableLimit: 2 })),
`[ "a", "b", ... 1 more item ]`,
);
assertEquals(
- stripColor(Deno.inspect(new Set(["a", "b", "c"]), { iterableLimit: 2 })),
+ stripAnsiCode(Deno.inspect(new Set(["a", "b", "c"]), { iterableLimit: 2 })),
`Set(3) { "a", "b", ... 1 more item }`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Map([
["a", 1],
["b", 2],
@@ -2084,19 +2089,19 @@ Deno.test(function inspectIterableLimit() {
Deno.test(function inspectProxy() {
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy([1, 2, 3], {}),
)),
"[ 1, 2, 3 ]",
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy({ key: "value" }, {}),
)),
`{ key: "value" }`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy({}, {
get(_target, key) {
if (key === Symbol.toStringTag) {
@@ -2120,14 +2125,14 @@ Deno.test(function inspectProxy() {
`Object [MyProxy] { prop1: 5, prop2: 5 }`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy([1, 2, 3], { get() {} }),
{ showProxy: true },
)),
"Proxy [ [ 1, 2, 3 ], { get: [Function: get] } ]",
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy({ a: 1 }, {
set(): boolean {
return false;
@@ -2138,7 +2143,7 @@ Deno.test(function inspectProxy() {
"Proxy [ { a: 1 }, { set: [Function: set] } ]",
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy([1, 2, 3, 4, 5, 6, 7], { get() {} }),
{ showProxy: true },
)),
@@ -2151,7 +2156,7 @@ Deno.test(function inspectProxy() {
]`,
);
assertEquals(
- stripColor(Deno.inspect(
+ stripAnsiCode(Deno.inspect(
new Proxy(function fn() {}, { get() {} }),
{ showProxy: true },
)),
@@ -2166,15 +2171,15 @@ Deno.test(function inspectError() {
});
assertStringIncludes(
- stripColor(Deno.inspect(error1)),
+ stripAnsiCode(Deno.inspect(error1)),
"Error: This is an error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error2)),
+ stripAnsiCode(Deno.inspect(error2)),
"Error: This is an error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error2)),
+ stripAnsiCode(Deno.inspect(error2)),
"Caused by Error: This is a cause error",
);
});
@@ -2189,19 +2194,19 @@ Deno.test(function inspectErrorCircular() {
error2.cause.cause = error2;
assertStringIncludes(
- stripColor(Deno.inspect(error1)),
+ stripAnsiCode(Deno.inspect(error1)),
"Error: This is an error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error2)),
+ stripAnsiCode(Deno.inspect(error2)),
"<ref *1> Error: This is an error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error2)),
+ stripAnsiCode(Deno.inspect(error2)),
"Caused by Error: This is a cause error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error2)),
+ stripAnsiCode(Deno.inspect(error2)),
"Caused by [Circular *1]",
);
});
@@ -2213,11 +2218,11 @@ Deno.test(function inspectErrorWithCauseFormat() {
},
});
assertStringIncludes(
- stripColor(Deno.inspect(error)),
+ stripAnsiCode(Deno.inspect(error)),
"Error: This is an error",
);
assertStringIncludes(
- stripColor(Deno.inspect(error)),
+ stripAnsiCode(Deno.inspect(error)),
"Caused by { code: 100500 }",
);
});
diff --git a/tests/unit/fetch_test.ts b/tests/unit/fetch_test.ts
index 39cadcb44..09cbb5cd2 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 "@std/io/buffer.ts";
+import { Buffer } from "@std/io/buffer";
const listenPort = 4506;
diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts
index b25b2fd5d..754c6fb15 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 "@std/io/copy.ts";
+import { copy } from "@std/io/copy";
// Note tests for Deno.FsFile.setRaw is in integration tests.
diff --git a/tests/unit/http_test.ts b/tests/unit/http_test.ts
index 03c30965f..6d3543e44 100644
--- a/tests/unit/http_test.ts
+++ b/tests/unit/http_test.ts
@@ -2,7 +2,7 @@
// deno-lint-ignore-file no-deprecated-deno-api
-import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
+import { Buffer, BufReader, BufWriter } from "@std/io";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
@@ -13,7 +13,7 @@ import {
delay,
fail,
} from "./test_util.ts";
-import { join } from "@std/path/mod.ts";
+import { join } from "@std/path";
const listenPort = 4507;
const listenPort2 = 4508;
diff --git a/tests/unit/io_test.ts b/tests/unit/io_test.ts
index aadb82297..5b55729dd 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 "@std/io/buffer.ts";
+import { Buffer } from "@std/io/buffer";
const DEFAULT_BUF_SIZE = 32 * 1024;
diff --git a/tests/unit/kv_test.ts b/tests/unit/kv_test.ts
index c39e0d0fc..28d79d1f9 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 "@std/testing/types.ts";
+import { assertType, IsExact } from "@std/testing/types";
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 87023bb1f..0fcbc5e95 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 "@std/assert/mod.ts";
+import { assert, assertEquals } from "@std/assert";
Deno.test("messagechannel", async () => {
const mc = new MessageChannel();
diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts
index ee87d8189..4a7d53e1b 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 "@std/assert/mod.ts";
-import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
+import { assertMatch, assertRejects } from "@std/assert";
+import { Buffer, BufReader, BufWriter } from "@std/io";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
diff --git a/tests/unit/test_util.ts b/tests/unit/test_util.ts
index db2585ebd..e45a963e9 100644
--- a/tests/unit/test_util.ts
+++ b/tests/unit/test_util.ts
@@ -1,9 +1,9 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import * as colors from "@std/fmt/colors.ts";
-import { assert } from "@std/assert/mod.ts";
+import * as colors from "@std/fmt/colors";
+import { assert } from "@std/assert";
export { colors };
-import { join, resolve } from "@std/path/mod.ts";
+import { join, resolve } from "@std/path";
export {
assert,
assertEquals,
@@ -20,10 +20,10 @@ export {
fail,
unimplemented,
unreachable,
-} 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";
+} from "@std/assert";
+export { delay } from "@std/async/delay";
+export { readLines } from "@std/io/read-lines";
+export { parseArgs } from "@std/cli/parse-args";
export function pathToAbsoluteFileUrl(path: string): URL {
path = resolve(path);
diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts
index 5be05b73e..34061bb21 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 "@std/io/mod.ts";
-import { readAll } from "@std/io/read_all.ts";
-import { writeAll } from "@std/io/write_all.ts";
+import { BufReader, BufWriter } from "@std/io";
+import { readAll } from "@std/io/read-all";
+import { writeAll } from "@std/io/write-all";
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 2b635a513..3c1fb0cf1 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 "@std/testing/types.ts";
+import { assertType, IsExact } from "@std/testing/types";
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 19941e08e..4f8c321c9 100644
--- a/tests/unit/websocketstream_test.ts.disabled
+++ b/tests/unit/websocketstream_test.ts.disabled
@@ -6,7 +6,7 @@ import {
assertRejects,
assertThrows,
unreachable,
-} from "@std/assert/mod.ts";
+} from "@std/assert";
Deno.test("fragment", () => {
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
diff --git a/tests/unit/worker_test.ts b/tests/unit/worker_test.ts
index a66eb69a9..526618d54 100644
--- a/tests/unit/worker_test.ts
+++ b/tests/unit/worker_test.ts
@@ -2,12 +2,7 @@
// Requires to be run with `--allow-net` flag
-import {
- assert,
- assertEquals,
- assertMatch,
- assertThrows,
-} from "@std/assert/mod.ts";
+import { assert, assertEquals, assertMatch, assertThrows } from "@std/assert";
function resolveWorker(worker: string): string {
return import.meta.resolve(`../testdata/workers/${worker}`);