diff --git a/cli/tests/config/deno.json b/cli/tests/config/deno.json new file mode 100644 index 0000000000..fe518960f3 --- /dev/null +++ b/cli/tests/config/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@test_util/": "../../../test_util/" + } +} diff --git a/cli/tests/integration/js_unit_tests.rs b/cli/tests/integration/js_unit_tests.rs index cb843ee4e8..951fc6f624 100644 --- a/cli/tests/integration/js_unit_tests.rs +++ b/cli/tests/integration/js_unit_tests.rs @@ -119,6 +119,9 @@ fn js_unit_test(test: String) { let deno = util::deno_cmd() .current_dir(util::root_path()) .arg("test") + .arg("--config") + .arg("cli/tests/config/deno.json") + .arg("--no-lock") .arg("--unstable") .arg("--location=http://js-unit-tests/foo/bar") .arg("--no-prompt"); diff --git a/cli/tests/integration/node_unit_tests.rs b/cli/tests/integration/node_unit_tests.rs index 680d4018b0..b0259663d6 100644 --- a/cli/tests/integration/node_unit_tests.rs +++ b/cli/tests/integration/node_unit_tests.rs @@ -96,6 +96,9 @@ fn node_unit_test(test: String) { let mut deno = util::deno_cmd() .current_dir(util::root_path()) .arg("test") + .arg("--config") + .arg("cli/tests/config/deno.json") + .arg("--no-lock") .arg("--unstable") // TODO(kt3k): This option is required to pass tls_test.ts, // but this shouldn't be necessary. tls.connect currently doesn't diff --git a/cli/tests/unit/blob_test.ts b/cli/tests/unit/blob_test.ts index dbdd4e297a..e6623a65c4 100644 --- a/cli/tests/unit/blob_test.ts +++ b/cli/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 "@test_util/std/bytes/concat.ts"; Deno.test(function blobString() { const b1 = new Blob(["Hello World"]); diff --git a/cli/tests/unit/broadcast_channel_test.ts b/cli/tests/unit/broadcast_channel_test.ts index f412db682f..c5d7f7e7f9 100644 --- a/cli/tests/unit/broadcast_channel_test.ts +++ b/cli/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 "@test_util/std/assert/mod.ts"; Deno.test("BroadcastChannel worker", async () => { const intercom = new BroadcastChannel("intercom"); diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 219b6ab077..2f24b2c4eb 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/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 "@test_util/std/fmt/colors.ts"; const customInspect = Symbol.for("Deno.customInspect"); const { diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index 62f31896d1..84e94de0d3 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/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 "@test_util/std/io/buffer.ts"; const listenPort = 4506; diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index aed09e8146..2501ea643e 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/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 "@test_util/std/streams/copy.ts"; Deno.test(function filesStdioFileDescriptors() { assertEquals(Deno.stdin.rid, 0); diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index a7f34f0acb..66cc531137 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/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 "@test_util/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 "@test_util/std/path/mod.ts"; const listenPort = 4507; const listenPort2 = 4508; diff --git a/cli/tests/unit/io_test.ts b/cli/tests/unit/io_test.ts index 236bb27fe4..04c9dab4b9 100644 --- a/cli/tests/unit/io_test.ts +++ b/cli/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 "@test_util/std/io/buffer.ts"; const DEFAULT_BUF_SIZE = 32 * 1024; diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts index c98611e2da..5780d9900b 100644 --- a/cli/tests/unit/kv_test.ts +++ b/cli/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 "@test_util/std/testing/types.ts"; const sleep = (time: number) => new Promise((r) => setTimeout(r, time)); diff --git a/cli/tests/unit/message_channel_test.ts b/cli/tests/unit/message_channel_test.ts index 59cf38430e..88fb1ba11b 100644 --- a/cli/tests/unit/message_channel_test.ts +++ b/cli/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 "@test_util/std/assert/mod.ts"; Deno.test("messagechannel", async () => { const mc = new MessageChannel(); diff --git a/cli/tests/unit/serve_test.ts b/cli/tests/unit/serve_test.ts index 09bd860152..b5c966d6f0 100644 --- a/cli/tests/unit/serve_test.ts +++ b/cli/tests/unit/serve_test.ts @@ -1,10 +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 "@test_util/std/assert/mod.ts"; +import { Buffer, BufReader, BufWriter } from "@test_util/std/io/mod.ts"; import { TextProtoReader } from "../testdata/run/textproto.ts"; import { assert, diff --git a/cli/tests/unit/test_util.ts b/cli/tests/unit/test_util.ts index 14d212b82b..2f2730794a 100644 --- a/cli/tests/unit/test_util.ts +++ b/cli/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 "@test_util/std/fmt/colors.ts"; export { colors }; -import { join, resolve } from "../../../test_util/std/path/mod.ts"; +import { join, resolve } from "@test_util/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 "@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"; export function pathToAbsoluteFileUrl(path: string): URL { path = resolve(path); diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts index 2e797b1609..bbf48cf8fc 100644 --- a/cli/tests/unit/tls_test.ts +++ b/cli/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 "@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 { TextProtoReader } from "../testdata/run/textproto.ts"; const encoder = new TextEncoder(); diff --git a/cli/tests/unit/urlpattern_test.ts b/cli/tests/unit/urlpattern_test.ts index 60800a3613..7730dbe407 100644 --- a/cli/tests/unit/urlpattern_test.ts +++ b/cli/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 "@test_util/std/testing/types.ts"; Deno.test(function urlPatternFromString() { const pattern = new URLPattern("https://deno.land/foo/:bar"); diff --git a/cli/tests/unit_node/_fs/_fs_access_test.ts b/cli/tests/unit_node/_fs/_fs_access_test.ts index 6239f17cb8..5b5b7f34df 100644 --- a/cli/tests/unit_node/_fs/_fs_access_test.ts +++ b/cli/tests/unit_node/_fs/_fs_access_test.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as fs from "node:fs"; -import { - assertRejects, - assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertRejects, assertThrows } from "@test_util/std/assert/mod.ts"; Deno.test( "[node/fs.access] Uses the owner permission when the user is the owner", diff --git a/cli/tests/unit_node/_fs/_fs_appendFile_test.ts b/cli/tests/unit_node/_fs/_fs_appendFile_test.ts index a7dec7e7c8..57271efdbc 100644 --- a/cli/tests/unit_node/_fs/_fs_appendFile_test.ts +++ b/cli/tests/unit_node/_fs/_fs_appendFile_test.ts @@ -1,11 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { appendFile, appendFileSync } from "node:fs"; -import { fromFileUrl } from "../../../../test_util/std/path/mod.ts"; +import { fromFileUrl } from "@test_util/std/path/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; const decoder = new TextDecoder("utf-8"); diff --git a/cli/tests/unit_node/_fs/_fs_chmod_test.ts b/cli/tests/unit_node/_fs/_fs_chmod_test.ts index 69a1cc0178..2bddcb2932 100644 --- a/cli/tests/unit_node/_fs/_fs_chmod_test.ts +++ b/cli/tests/unit_node/_fs/_fs_chmod_test.ts @@ -4,7 +4,7 @@ import { assertRejects, assertThrows, fail, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chmod, chmodSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_chown_test.ts b/cli/tests/unit_node/_fs/_fs_chown_test.ts index 06c19713ce..d4f6ea0e80 100644 --- a/cli/tests/unit_node/_fs/_fs_chown_test.ts +++ b/cli/tests/unit_node/_fs/_fs_chown_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chown, chownSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_close_test.ts b/cli/tests/unit_node/_fs/_fs_close_test.ts index fb9ce05c30..155667305b 100644 --- a/cli/tests/unit_node/_fs/_fs_close_test.ts +++ b/cli/tests/unit_node/_fs/_fs_close_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { close, closeSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_copy_test.ts b/cli/tests/unit_node/_fs/_fs_copy_test.ts index 67179f45b6..915ee93bdf 100644 --- a/cli/tests/unit_node/_fs/_fs_copy_test.ts +++ b/cli/tests/unit_node/_fs/_fs_copy_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "../../../../test_util/std/path/mod.ts"; -import { assert } from "../../../../test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { assert } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { copyFile, copyFileSync, existsSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_dir_test.ts b/cli/tests/unit_node/_fs/_fs_dir_test.ts index cd8c8b510b..697929fee5 100644 --- a/cli/tests/unit_node/_fs/_fs_dir_test.ts +++ b/cli/tests/unit_node/_fs/_fs_dir_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertEquals, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { Dir as DirOrig, type Dirent } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_dirent_test.ts b/cli/tests/unit_node/_fs/_fs_dirent_test.ts index 1ba6e91f11..a42f6a25c5 100644 --- a/cli/tests/unit_node/_fs/_fs_dirent_test.ts +++ b/cli/tests/unit_node/_fs/_fs_dirent_test.ts @@ -3,7 +3,7 @@ import { assert, assertEquals, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { Dirent as Dirent_ } from "node:fs"; // deno-lint-ignore no-explicit-any diff --git a/cli/tests/unit_node/_fs/_fs_exists_test.ts b/cli/tests/unit_node/_fs/_fs_exists_test.ts index b505c51425..baf959502c 100644 --- a/cli/tests/unit_node/_fs/_fs_exists_test.ts +++ b/cli/tests/unit_node/_fs/_fs_exists_test.ts @@ -3,7 +3,7 @@ import { assert, assertEquals, assertStringIncludes, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { exists, existsSync } from "node:fs"; import { promisify } from "node:util"; diff --git a/cli/tests/unit_node/_fs/_fs_fdatasync_test.ts b/cli/tests/unit_node/_fs/_fs_fdatasync_test.ts index 5a57ba5537..7a61bd4c1a 100644 --- a/cli/tests/unit_node/_fs/_fs_fdatasync_test.ts +++ b/cli/tests/unit_node/_fs/_fs_fdatasync_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { fdatasync, fdatasyncSync } from "node:fs"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_fstat_test.ts b/cli/tests/unit_node/_fs/_fs_fstat_test.ts index 220b9589a7..d15ef5a807 100644 --- a/cli/tests/unit_node/_fs/_fs_fstat_test.ts +++ b/cli/tests/unit_node/_fs/_fs_fstat_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { fstat, fstatSync } from "node:fs"; -import { fail } from "../../../../test_util/std/assert/mod.ts"; +import { fail } from "@test_util/std/assert/mod.ts"; import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts"; import type { BigIntStats, Stats } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_fsync_test.ts b/cli/tests/unit_node/_fs/_fs_fsync_test.ts index 90bbed9dae..870055c004 100644 --- a/cli/tests/unit_node/_fs/_fs_fsync_test.ts +++ b/cli/tests/unit_node/_fs/_fs_fsync_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { fsync, fsyncSync } from "node:fs"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_ftruncate_test.ts b/cli/tests/unit_node/_fs/_fs_ftruncate_test.ts index ef59f05777..1e669fb60b 100644 --- a/cli/tests/unit_node/_fs/_fs_ftruncate_test.ts +++ b/cli/tests/unit_node/_fs/_fs_ftruncate_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { ftruncate, ftruncateSync } from "node:fs"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_futimes_test.ts b/cli/tests/unit_node/_fs/_fs_futimes_test.ts index 2bfe0175a5..bf37469573 100644 --- a/cli/tests/unit_node/_fs/_fs_futimes_test.ts +++ b/cli/tests/unit_node/_fs/_fs_futimes_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { futimes, futimesSync } from "node:fs"; const randomDate = new Date(Date.now() + 1000); diff --git a/cli/tests/unit_node/_fs/_fs_handle_test.ts b/cli/tests/unit_node/_fs/_fs_handle_test.ts index 3e5bb70d52..151d4d7524 100644 --- a/cli/tests/unit_node/_fs/_fs_handle_test.ts +++ b/cli/tests/unit_node/_fs/_fs_handle_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "../../../../test_util/std/path/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; import { Buffer } from "node:buffer"; import * as fs from "node:fs/promises"; -import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); diff --git a/cli/tests/unit_node/_fs/_fs_link_test.ts b/cli/tests/unit_node/_fs/_fs_link_test.ts index 8407a3fd7d..15f15c7061 100644 --- a/cli/tests/unit_node/_fs/_fs_link_test.ts +++ b/cli/tests/unit_node/_fs/_fs_link_test.ts @@ -1,10 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "../../../../test_util/std/path/mod.ts"; -import { - assert, - assertEquals, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { assert, assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { link, linkSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_lstat_test.ts b/cli/tests/unit_node/_fs/_fs_lstat_test.ts index d8cda8de45..ccd21a3cde 100644 --- a/cli/tests/unit_node/_fs/_fs_lstat_test.ts +++ b/cli/tests/unit_node/_fs/_fs_lstat_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { lstat, lstatSync } from "node:fs"; -import { fail } from "../../../../test_util/std/assert/mod.ts"; +import { fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts"; import type { BigIntStats, Stats } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_mkdir_test.ts b/cli/tests/unit_node/_fs/_fs_mkdir_test.ts index 51f7e5d1c7..fb7fcf9c52 100644 --- a/cli/tests/unit_node/_fs/_fs_mkdir_test.ts +++ b/cli/tests/unit_node/_fs/_fs_mkdir_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "../../../../test_util/std/path/mod.ts"; -import { assert } from "../../../../test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { assert } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { existsSync, mkdir, mkdirSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_mkdtemp_test.ts b/cli/tests/unit_node/_fs/_fs_mkdtemp_test.ts index fb7340b570..9f89751132 100644 --- a/cli/tests/unit_node/_fs/_fs_mkdtemp_test.ts +++ b/cli/tests/unit_node/_fs/_fs_mkdtemp_test.ts @@ -3,7 +3,7 @@ import { assert, assertRejects, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { EncodingOption, existsSync, mkdtemp, mkdtempSync } from "node:fs"; import { env } from "node:process"; import { promisify } from "node:util"; diff --git a/cli/tests/unit_node/_fs/_fs_open_test.ts b/cli/tests/unit_node/_fs/_fs_open_test.ts index fa79aa68f8..8cb9b0ec2c 100644 --- a/cli/tests/unit_node/_fs/_fs_open_test.ts +++ b/cli/tests/unit_node/_fs/_fs_open_test.ts @@ -9,11 +9,7 @@ import { O_TRUNC, O_WRONLY, } from "node:constants"; -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { open, openSync } from "node:fs"; import { join, parse } from "node:path"; diff --git a/cli/tests/unit_node/_fs/_fs_opendir_test.ts b/cli/tests/unit_node/_fs/_fs_opendir_test.ts index 24ebc67b34..d4abb349cc 100644 --- a/cli/tests/unit_node/_fs/_fs_opendir_test.ts +++ b/cli/tests/unit_node/_fs/_fs_opendir_test.ts @@ -6,7 +6,7 @@ import { assertFalse, assertInstanceOf, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { opendir, opendirSync } from "node:fs"; import { Buffer } from "node:buffer"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/cli/tests/unit_node/_fs/_fs_readFile_test.ts b/cli/tests/unit_node/_fs/_fs_readFile_test.ts index 05cb909747..00653955d9 100644 --- a/cli/tests/unit_node/_fs/_fs_readFile_test.ts +++ b/cli/tests/unit_node/_fs/_fs_readFile_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { promises, readFile, readFileSync } from "node:fs"; -import * as path from "../../../../test_util/std/path/mod.ts"; -import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); diff --git a/cli/tests/unit_node/_fs/_fs_read_test.ts b/cli/tests/unit_node/_fs/_fs_read_test.ts index fbd23958da..de741e3774 100644 --- a/cli/tests/unit_node/_fs/_fs_read_test.ts +++ b/cli/tests/unit_node/_fs/_fs_read_test.ts @@ -4,11 +4,11 @@ import { assertFalse, assertMatch, assertStrictEquals, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { read, readSync } from "node:fs"; import { open, openSync } from "node:fs"; import { Buffer } from "node:buffer"; -import * as path from "../../../../test_util/std/path/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; import { closeSync } from "node:fs"; async function readTest( diff --git a/cli/tests/unit_node/_fs/_fs_readdir_test.ts b/cli/tests/unit_node/_fs/_fs_readdir_test.ts index 4d1d371b93..eaacbfc5e9 100644 --- a/cli/tests/unit_node/_fs/_fs_readdir_test.ts +++ b/cli/tests/unit_node/_fs/_fs_readdir_test.ts @@ -3,10 +3,10 @@ import { assertEquals, assertNotEquals, fail, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { readdir, readdirSync } from "node:fs"; -import { join } from "../../../../test_util/std/path/mod.ts"; +import { join } from "@test_util/std/path/mod.ts"; Deno.test({ name: "ASYNC: reading empty directory", diff --git a/cli/tests/unit_node/_fs/_fs_readlink_test.ts b/cli/tests/unit_node/_fs/_fs_readlink_test.ts index 0d7c843d4c..02d84c6c37 100644 --- a/cli/tests/unit_node/_fs/_fs_readlink_test.ts +++ b/cli/tests/unit_node/_fs/_fs_readlink_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { readlink, readlinkSync } from "node:fs"; -import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts"; -import * as path from "../../../../test_util/std/path/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; const testDir = Deno.makeTempDirSync(); const oldname = path.join(testDir, "oldname"); diff --git a/cli/tests/unit_node/_fs/_fs_realpath_test.ts b/cli/tests/unit_node/_fs/_fs_realpath_test.ts index e872374672..6f22ff72a5 100644 --- a/cli/tests/unit_node/_fs/_fs_realpath_test.ts +++ b/cli/tests/unit_node/_fs/_fs_realpath_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "../../../../test_util/std/path/mod.ts"; -import { assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { realpath, realpathSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_rename_test.ts b/cli/tests/unit_node/_fs/_fs_rename_test.ts index 699e02fce6..dd0a01f8a7 100644 --- a/cli/tests/unit_node/_fs/_fs_rename_test.ts +++ b/cli/tests/unit_node/_fs/_fs_rename_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { rename, renameSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join, parse } from "../../../../test_util/std/path/mod.ts"; +import { join, parse } from "@test_util/std/path/mod.ts"; Deno.test({ name: "ASYNC: renaming a file", diff --git a/cli/tests/unit_node/_fs/_fs_rm_test.ts b/cli/tests/unit_node/_fs/_fs_rm_test.ts index 881ee1c4f5..1cc82a0cc7 100644 --- a/cli/tests/unit_node/_fs/_fs_rm_test.ts +++ b/cli/tests/unit_node/_fs/_fs_rm_test.ts @@ -4,10 +4,10 @@ import { assertRejects, assertThrows, fail, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { rm, rmSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join } from "../../../../test_util/std/path/mod.ts"; +import { join } from "@test_util/std/path/mod.ts"; Deno.test({ name: "ASYNC: removing empty folder", diff --git a/cli/tests/unit_node/_fs/_fs_rmdir_test.ts b/cli/tests/unit_node/_fs/_fs_rmdir_test.ts index 1fe9e499cd..d2b075bdf4 100644 --- a/cli/tests/unit_node/_fs/_fs_rmdir_test.ts +++ b/cli/tests/unit_node/_fs/_fs_rmdir_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { rmdir, rmdirSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join } from "../../../../test_util/std/path/mod.ts"; +import { join } from "@test_util/std/path/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_stat_test.ts b/cli/tests/unit_node/_fs/_fs_stat_test.ts index 72bae01b5f..38d5ca9851 100644 --- a/cli/tests/unit_node/_fs/_fs_stat_test.ts +++ b/cli/tests/unit_node/_fs/_fs_stat_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { BigIntStats, stat, Stats, statSync } from "node:fs"; -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; export function assertStats(actual: Stats, expected: Deno.FileInfo) { assertEquals(actual.dev, expected.dev); diff --git a/cli/tests/unit_node/_fs/_fs_symlink_test.ts b/cli/tests/unit_node/_fs/_fs_symlink_test.ts index cda42e92af..4e42da2936 100644 --- a/cli/tests/unit_node/_fs/_fs_symlink_test.ts +++ b/cli/tests/unit_node/_fs/_fs_symlink_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { symlink, symlinkSync } from "node:fs"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_truncate_test.ts b/cli/tests/unit_node/_fs/_fs_truncate_test.ts index ff087095be..9b7a9c4905 100644 --- a/cli/tests/unit_node/_fs/_fs_truncate_test.ts +++ b/cli/tests/unit_node/_fs/_fs_truncate_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { truncate, truncateSync } from "node:fs"; Deno.test({ diff --git a/cli/tests/unit_node/_fs/_fs_unlink_test.ts b/cli/tests/unit_node/_fs/_fs_unlink_test.ts index 8baba49a4f..1bdd9ee29a 100644 --- a/cli/tests/unit_node/_fs/_fs_unlink_test.ts +++ b/cli/tests/unit_node/_fs/_fs_unlink_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, fail } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, fail } from "@test_util/std/assert/mod.ts"; import { existsSync } from "node:fs"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { unlink, unlinkSync } from "node:fs"; diff --git a/cli/tests/unit_node/_fs/_fs_utimes_test.ts b/cli/tests/unit_node/_fs/_fs_utimes_test.ts index 8a16c057f3..1c6c7455e8 100644 --- a/cli/tests/unit_node/_fs/_fs_utimes_test.ts +++ b/cli/tests/unit_node/_fs/_fs_utimes_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertThrows, - fail, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts"; import { utimes, utimesSync } from "node:fs"; const randomDate = new Date(Date.now() + 1000); diff --git a/cli/tests/unit_node/_fs/_fs_watch_test.ts b/cli/tests/unit_node/_fs/_fs_watch_test.ts index 1b1fc79d12..ffa6cac454 100644 --- a/cli/tests/unit_node/_fs/_fs_watch_test.ts +++ b/cli/tests/unit_node/_fs/_fs_watch_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { watch } from "node:fs"; -import { assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; function wait(time: number) { return new Promise((resolve) => { diff --git a/cli/tests/unit_node/_fs/_fs_writeFile_test.ts b/cli/tests/unit_node/_fs/_fs_writeFile_test.ts index 0bff905946..44f1403df2 100644 --- a/cli/tests/unit_node/_fs/_fs_writeFile_test.ts +++ b/cli/tests/unit_node/_fs/_fs_writeFile_test.ts @@ -5,9 +5,9 @@ import { assertNotEquals, assertRejects, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { writeFile, writeFileSync } from "node:fs"; -import * as path from "../../../../test_util/std/path/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; type TextEncodings = | "ascii" diff --git a/cli/tests/unit_node/_fs/_fs_write_test.ts b/cli/tests/unit_node/_fs/_fs_write_test.ts index ef538e9e46..7e75f321fd 100644 --- a/cli/tests/unit_node/_fs/_fs_write_test.ts +++ b/cli/tests/unit_node/_fs/_fs_write_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { write, writeSync } from "node:fs"; -import { assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; import { Buffer } from "node:buffer"; const decoder = new TextDecoder("utf-8"); diff --git a/cli/tests/unit_node/_test_utils.ts b/cli/tests/unit_node/_test_utils.ts index 5103556472..3942cf0a95 100644 --- a/cli/tests/unit_node/_test_utils.ts +++ b/cli/tests/unit_node/_test_utils.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertStringIncludes, -} from "../../../test_util/std/assert/mod.ts"; +import { assert, assertStringIncludes } from "@test_util/std/assert/mod.ts"; /** Asserts that an error thrown in a callback will not be wrongly caught. */ export async function assertCallbackErrorUncaught( diff --git a/cli/tests/unit_node/assertion_error_test.ts b/cli/tests/unit_node/assertion_error_test.ts index a4f57c4794..b61baee93a 100644 --- a/cli/tests/unit_node/assertion_error_test.ts +++ b/cli/tests/unit_node/assertion_error_test.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { stripColor } from "../../../test_util/std/fmt/colors.ts"; -import { - assert, - assertStrictEquals, -} from "../../../test_util/std/assert/mod.ts"; +import { stripColor } from "@test_util/std/fmt/colors.ts"; +import { assert, assertStrictEquals } from "@test_util/std/assert/mod.ts"; import { AssertionError } from "node:assert"; Deno.test({ diff --git a/cli/tests/unit_node/async_hooks_test.ts b/cli/tests/unit_node/async_hooks_test.ts index 0c64eafe62..1d0910d103 100644 --- a/cli/tests/unit_node/async_hooks_test.ts +++ b/cli/tests/unit_node/async_hooks_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { AsyncLocalStorage, AsyncResource } from "node:async_hooks"; -import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; Deno.test(async function foo() { const asyncLocalStorage = new AsyncLocalStorage(); diff --git a/cli/tests/unit_node/buffer_test.ts b/cli/tests/unit_node/buffer_test.ts index 0fd82c82ad..af83c9ada0 100644 --- a/cli/tests/unit_node/buffer_test.ts +++ b/cli/tests/unit_node/buffer_test.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { Buffer } from "node:buffer"; -import { - assertEquals, - assertThrows, -} from "../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts"; Deno.test({ name: "[node/buffer] alloc fails if size is not a number", diff --git a/cli/tests/unit_node/child_process_test.ts b/cli/tests/unit_node/child_process_test.ts index 066e45f722..5314d66e75 100644 --- a/cli/tests/unit_node/child_process_test.ts +++ b/cli/tests/unit_node/child_process_test.ts @@ -9,8 +9,8 @@ import { assertNotStrictEquals, assertStrictEquals, assertStringIncludes, -} from "../../../test_util/std/assert/mod.ts"; -import * as path from "../../../test_util/std/path/mod.ts"; +} from "@test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; const { spawn, spawnSync, execFile, execFileSync, ChildProcess } = CP; diff --git a/cli/tests/unit_node/console_test.ts b/cli/tests/unit_node/console_test.ts index 00765f213a..bf6f667f2d 100644 --- a/cli/tests/unit_node/console_test.ts +++ b/cli/tests/unit_node/console_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import vm from "node:vm"; -import { stripColor } from "../../../test_util/std/fmt/colors.ts"; -import { assertStringIncludes } from "../../../test_util/std/assert/mod.ts"; +import { stripColor } from "@test_util/std/fmt/colors.ts"; +import { assertStringIncludes } from "@test_util/std/assert/mod.ts"; Deno.test(function inspectCrossRealmObjects() { assertStringIncludes( diff --git a/cli/tests/unit_node/crypto/crypto_cipher_gcm_test.ts b/cli/tests/unit_node/crypto/crypto_cipher_gcm_test.ts index 6c500f9f27..b7b6165469 100644 --- a/cli/tests/unit_node/crypto/crypto_cipher_gcm_test.ts +++ b/cli/tests/unit_node/crypto/crypto_cipher_gcm_test.ts @@ -4,7 +4,7 @@ import crypto from "node:crypto"; import { Buffer } from "node:buffer"; import testVectors128 from "./gcmEncryptExtIV128.json" assert { type: "json" }; import testVectors256 from "./gcmEncryptExtIV256.json" assert { type: "json" }; -import { assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; const aesGcm = (bits: string, key: Uint8Array) => { const ALGO = bits == "128" ? `aes-128-gcm` : `aes-256-gcm`; diff --git a/cli/tests/unit_node/crypto/crypto_cipher_test.ts b/cli/tests/unit_node/crypto/crypto_cipher_test.ts index 7ea361bf6b..3da7ae3f16 100644 --- a/cli/tests/unit_node/crypto/crypto_cipher_test.ts +++ b/cli/tests/unit_node/crypto/crypto_cipher_test.ts @@ -3,10 +3,7 @@ import crypto from "node:crypto"; import { Buffer } from "node:buffer"; import { Readable } from "node:stream"; import { buffer, text } from "node:stream/consumers"; -import { - assertEquals, - assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts"; const rsaPrivateKey = Deno.readTextFileSync( new URL("../testdata/rsa_private.pem", import.meta.url), diff --git a/cli/tests/unit_node/crypto/crypto_hash_test.ts b/cli/tests/unit_node/crypto/crypto_hash_test.ts index e1bb4de8a6..ff1c9c598a 100644 --- a/cli/tests/unit_node/crypto/crypto_hash_test.ts +++ b/cli/tests/unit_node/crypto/crypto_hash_test.ts @@ -8,7 +8,7 @@ import { } from "node:crypto"; import { Buffer } from "node:buffer"; import { Readable } from "node:stream"; -import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; // https://github.com/denoland/deno/issues/18140 Deno.test({ diff --git a/cli/tests/unit_node/crypto/crypto_key_test.ts b/cli/tests/unit_node/crypto/crypto_key_test.ts index 3ad195df1a..8d1b24b21f 100644 --- a/cli/tests/unit_node/crypto/crypto_key_test.ts +++ b/cli/tests/unit_node/crypto/crypto_key_test.ts @@ -11,10 +11,7 @@ import { } from "node:crypto"; import { promisify } from "node:util"; import { Buffer } from "node:buffer"; -import { - assertEquals, - assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts"; import { createHmac } from "node:crypto"; const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1"; diff --git a/cli/tests/unit_node/crypto/crypto_sign_test.ts b/cli/tests/unit_node/crypto/crypto_sign_test.ts index 000f2311a3..287b54cc1d 100644 --- a/cli/tests/unit_node/crypto/crypto_sign_test.ts +++ b/cli/tests/unit_node/crypto/crypto_sign_test.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertEquals, -} from "../../../../test_util/std/testing/asserts.ts"; +import { assert, assertEquals } from "@test_util/std/testing/asserts.ts"; import { createSign, createVerify, sign, verify } from "node:crypto"; import { Buffer } from "node:buffer"; diff --git a/cli/tests/unit_node/dgram_test.ts b/cli/tests/unit_node/dgram_test.ts index d532241f51..4c6e49577b 100644 --- a/cli/tests/unit_node/dgram_test.ts +++ b/cli/tests/unit_node/dgram_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals } from "../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; import { execCode } from "../unit/test_util.ts"; import { createSocket } from "node:dgram"; diff --git a/cli/tests/unit_node/fs_test.ts b/cli/tests/unit_node/fs_test.ts index 6766c59280..c7698cb7d1 100644 --- a/cli/tests/unit_node/fs_test.ts +++ b/cli/tests/unit_node/fs_test.ts @@ -4,7 +4,7 @@ import { assert, assertEquals, assertThrows, -} from "../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { join } from "node:path"; import { tmpdir } from "node:os"; import { diff --git a/cli/tests/unit_node/http2_test.ts b/cli/tests/unit_node/http2_test.ts index 4972a31d9c..5db5cc8e8e 100644 --- a/cli/tests/unit_node/http2_test.ts +++ b/cli/tests/unit_node/http2_test.ts @@ -2,7 +2,7 @@ import * as http2 from "node:http2"; import * as net from "node:net"; -import { assertEquals } from "../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; for (const url of ["http://127.0.0.1:4246", "https://127.0.0.1:4247"]) { Deno.test(`[node/http2 client] ${url}`, { diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index 7b2012471a..c94d05ad95 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -3,16 +3,12 @@ import EventEmitter from "node:events"; import http, { type RequestOptions } from "node:http"; import https from "node:https"; -import { - assert, - assertEquals, - fail, -} from "../../../test_util/std/assert/mod.ts"; -import { assertSpyCalls, spy } from "../../../test_util/std/testing/mock.ts"; +import { assert, assertEquals, fail } from "@test_util/std/assert/mod.ts"; +import { assertSpyCalls, spy } from "@test_util/std/testing/mock.ts"; import { gzip } from "node:zlib"; import { Buffer } from "node:buffer"; -import { serve } from "../../../test_util/std/http/server.ts"; +import { serve } from "@test_util/std/http/server.ts"; import { execCode } from "../unit/test_util.ts"; Deno.test("[node/http listen]", async () => { diff --git a/cli/tests/unit_node/internal/_randomBytes_test.ts b/cli/tests/unit_node/internal/_randomBytes_test.ts index 8b8b0a99a2..13ee825661 100644 --- a/cli/tests/unit_node/internal/_randomBytes_test.ts +++ b/cli/tests/unit_node/internal/_randomBytes_test.ts @@ -4,7 +4,7 @@ import { assertEquals, assertRejects, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { pseudoRandomBytes, randomBytes } from "node:crypto"; diff --git a/cli/tests/unit_node/internal/_randomFill_test.ts b/cli/tests/unit_node/internal/_randomFill_test.ts index c15b5a8a18..d855699605 100644 --- a/cli/tests/unit_node/internal/_randomFill_test.ts +++ b/cli/tests/unit_node/internal/_randomFill_test.ts @@ -5,7 +5,7 @@ import { assertEquals, assertNotEquals, assertThrows, -} from "../../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; const validateNonZero = (buf: Buffer) => { if (!buf.some((ch) => ch > 0)) throw new Error("Error"); diff --git a/cli/tests/unit_node/internal/_randomInt_test.ts b/cli/tests/unit_node/internal/_randomInt_test.ts index caa7277d16..2639f77ce9 100644 --- a/cli/tests/unit_node/internal/_randomInt_test.ts +++ b/cli/tests/unit_node/internal/_randomInt_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { randomInt } from "node:crypto"; -import { assert, assertThrows } from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertThrows } from "@test_util/std/assert/mod.ts"; const between = (x: number, min: number, max: number) => x >= min && x < max; diff --git a/cli/tests/unit_node/internal/pbkdf2_test.ts b/cli/tests/unit_node/internal/pbkdf2_test.ts index 5e68ac01cf..019e76dcd0 100644 --- a/cli/tests/unit_node/internal/pbkdf2_test.ts +++ b/cli/tests/unit_node/internal/pbkdf2_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { pbkdf2, pbkdf2Sync } from "node:crypto"; -import { assert, assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; type Algorithms = | "md5" diff --git a/cli/tests/unit_node/internal/scrypt_test.ts b/cli/tests/unit_node/internal/scrypt_test.ts index 68eb51dc2b..bd846ba8df 100644 --- a/cli/tests/unit_node/internal/scrypt_test.ts +++ b/cli/tests/unit_node/internal/scrypt_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { scrypt, scryptSync } from "node:crypto"; import { Buffer } from "node:buffer"; -import { assertEquals } from "../../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; Deno.test("scrypt works correctly", async () => { const { promise, resolve } = Promise.withResolvers(); diff --git a/cli/tests/unit_node/module_test.ts b/cli/tests/unit_node/module_test.ts index 05edc5c41c..a27fccd7c1 100644 --- a/cli/tests/unit_node/module_test.ts +++ b/cli/tests/unit_node/module_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { createRequire, Module } from "node:module"; -import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; import process from "node:process"; import * as path from "node:path"; diff --git a/cli/tests/unit_node/net_test.ts b/cli/tests/unit_node/net_test.ts index cd4854ab1c..60cf9d8fc3 100644 --- a/cli/tests/unit_node/net_test.ts +++ b/cli/tests/unit_node/net_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as net from "node:net"; -import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts"; -import * as path from "../../../test_util/std/path/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; +import * as path from "@test_util/std/path/mod.ts"; import * as http from "node:http"; Deno.test("[node/net] close event emits after error event", async () => { diff --git a/cli/tests/unit_node/os_test.ts b/cli/tests/unit_node/os_test.ts index f4da8d030f..c18aa07c3e 100644 --- a/cli/tests/unit_node/os_test.ts +++ b/cli/tests/unit_node/os_test.ts @@ -7,7 +7,7 @@ import { assertEquals, assertNotEquals, assertThrows, -} from "../../../test_util/std/assert/mod.ts"; +} from "@test_util/std/assert/mod.ts"; Deno.test({ name: "build architecture is a string", diff --git a/cli/tests/unit_node/path_test.ts b/cli/tests/unit_node/path_test.ts index 0c50f0da15..a6c4ec5a82 100644 --- a/cli/tests/unit_node/path_test.ts +++ b/cli/tests/unit_node/path_test.ts @@ -4,7 +4,7 @@ import path from "node:path"; import posix from "node:path/posix"; import win32 from "node:path/win32"; -import { assertStrictEquals } from "../../../test_util/std/assert/mod.ts"; +import { assertStrictEquals } from "@test_util/std/assert/mod.ts"; Deno.test("[node/path] posix and win32 objects", () => { assertStrictEquals(path.posix, posix); diff --git a/cli/tests/unit_node/perf_hooks_test.ts b/cli/tests/unit_node/perf_hooks_test.ts index 6e25444e48..004eedfd6b 100644 --- a/cli/tests/unit_node/perf_hooks_test.ts +++ b/cli/tests/unit_node/perf_hooks_test.ts @@ -1,10 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as perfHooks from "node:perf_hooks"; import { performance } from "node:perf_hooks"; -import { - assertEquals, - assertThrows, -} from "../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts"; Deno.test({ name: "[perf_hooks] performance", diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index 21f873260e..4f4703d353 100644 --- a/cli/tests/unit_node/process_test.ts +++ b/cli/tests/unit_node/process_test.ts @@ -11,10 +11,10 @@ import { assertObjectMatch, assertStrictEquals, assertThrows, -} from "../../../test_util/std/assert/mod.ts"; -import { stripColor } from "../../../test_util/std/fmt/colors.ts"; -import * as path from "../../../test_util/std/path/mod.ts"; -import { delay } from "../../../test_util/std/async/delay.ts"; +} from "@test_util/std/assert/mod.ts"; +import { stripColor } from "@test_util/std/fmt/colors.ts"; +import * as path from "@test_util/std/path/mod.ts"; +import { delay } from "@test_util/std/async/delay.ts"; const testDir = new URL(".", import.meta.url); diff --git a/cli/tests/unit_node/querystring_test.ts b/cli/tests/unit_node/querystring_test.ts index ce2747db2b..9831d92ede 100644 --- a/cli/tests/unit_node/querystring_test.ts +++ b/cli/tests/unit_node/querystring_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 "@test_util/std/assert/mod.ts"; import { parse, stringify } from "node:querystring"; Deno.test({ diff --git a/cli/tests/unit_node/readline_test.ts b/cli/tests/unit_node/readline_test.ts index 9bdd96cc82..ecd1a893d2 100644 --- a/cli/tests/unit_node/readline_test.ts +++ b/cli/tests/unit_node/readline_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { createInterface, Interface } from "node:readline"; -import { assertInstanceOf } from "../../../test_util/std/assert/mod.ts"; +import { assertInstanceOf } from "@test_util/std/assert/mod.ts"; import { Readable, Writable } from "node:stream"; Deno.test("[node/readline] createInstance", () => { diff --git a/cli/tests/unit_node/repl_test.ts b/cli/tests/unit_node/repl_test.ts index cebc7c23c2..adfc1d60a6 100644 --- a/cli/tests/unit_node/repl_test.ts +++ b/cli/tests/unit_node/repl_test.ts @@ -2,7 +2,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import repl from "node:repl"; -import { assert } from "../../../test_util/std/assert/mod.ts"; +import { assert } from "@test_util/std/assert/mod.ts"; Deno.test({ name: "repl module exports", diff --git a/cli/tests/unit_node/stream_test.ts b/cli/tests/unit_node/stream_test.ts index b50d45c1db..ab81497d15 100644 --- a/cli/tests/unit_node/stream_test.ts +++ b/cli/tests/unit_node/stream_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert } from "../../../test_util/std/assert/mod.ts"; -import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts"; +import { assert } from "@test_util/std/assert/mod.ts"; +import { fromFileUrl, relative } from "@test_util/std/path/mod.ts"; import { pipeline } from "node:stream/promises"; import { createReadStream, createWriteStream } from "node:fs"; diff --git a/cli/tests/unit_node/string_decoder_test.ts b/cli/tests/unit_node/string_decoder_test.ts index 406fe57a6a..768ae3b3ae 100644 --- a/cli/tests/unit_node/string_decoder_test.ts +++ b/cli/tests/unit_node/string_decoder_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 "@test_util/std/assert/mod.ts"; import { Buffer } from "node:buffer"; import { StringDecoder } from "node:string_decoder"; diff --git a/cli/tests/unit_node/timers_test.ts b/cli/tests/unit_node/timers_test.ts index 40b70372ab..f5cccc9a92 100644 --- a/cli/tests/unit_node/timers_test.ts +++ b/cli/tests/unit_node/timers_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, fail } from "../../../test_util/std/assert/mod.ts"; +import { assert, fail } from "@test_util/std/assert/mod.ts"; import * as timers from "node:timers"; import * as timersPromises from "node:timers/promises"; diff --git a/cli/tests/unit_node/tls_test.ts b/cli/tests/unit_node/tls_test.ts index 3e6a892bd4..d87df4e331 100644 --- a/cli/tests/unit_node/tls_test.ts +++ b/cli/tests/unit_node/tls_test.ts @@ -1,12 +1,9 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertInstanceOf, -} from "../../../test_util/std/assert/mod.ts"; -import { delay } from "../../../test_util/std/async/delay.ts"; -import { fromFileUrl, join } from "../../../test_util/std/path/mod.ts"; -import { serveTls } from "../../../test_util/std/http/server.ts"; +import { assertEquals, assertInstanceOf } from "@test_util/std/assert/mod.ts"; +import { delay } from "@test_util/std/async/delay.ts"; +import { fromFileUrl, join } from "@test_util/std/path/mod.ts"; +import { serveTls } from "@test_util/std/http/server.ts"; import * as tls from "node:tls"; import * as net from "node:net"; import * as stream from "node:stream"; diff --git a/cli/tests/unit_node/tty_test.ts b/cli/tests/unit_node/tty_test.ts index f72eb088b8..43beda4bc0 100644 --- a/cli/tests/unit_node/tty_test.ts +++ b/cli/tests/unit_node/tty_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // deno-lint-ignore-file no-explicit-any -import { assert } from "../../../test_util/std/assert/mod.ts"; +import { assert } from "@test_util/std/assert/mod.ts"; import { isatty } from "node:tty"; import process from "node:process"; diff --git a/cli/tests/unit_node/util_test.ts b/cli/tests/unit_node/util_test.ts index a88128ee93..8480266c16 100644 --- a/cli/tests/unit_node/util_test.ts +++ b/cli/tests/unit_node/util_test.ts @@ -5,8 +5,8 @@ import { assertEquals, assertStrictEquals, assertThrows, -} from "../../../test_util/std/assert/mod.ts"; -import { stripColor } from "../../../test_util/std/fmt/colors.ts"; +} from "@test_util/std/assert/mod.ts"; +import { stripColor } from "@test_util/std/fmt/colors.ts"; import * as util from "node:util"; import { Buffer } from "node:buffer"; diff --git a/cli/tests/unit_node/v8_test.ts b/cli/tests/unit_node/v8_test.ts index f54ec72f6d..e48285d4eb 100644 --- a/cli/tests/unit_node/v8_test.ts +++ b/cli/tests/unit_node/v8_test.ts @@ -4,7 +4,7 @@ import { getHeapStatistics, setFlagsFromString, } from "node:v8"; -import { assertEquals } from "../../../test_util/std/assert/mod.ts"; +import { assertEquals } from "@test_util/std/assert/mod.ts"; // https://github.com/nodejs/node/blob/a2bbe5ff216bc28f8dac1c36a8750025a93c3827/test/parallel/test-v8-version-tag.js#L6 Deno.test({ diff --git a/cli/tests/unit_node/vm_test.ts b/cli/tests/unit_node/vm_test.ts index 83d169deb1..30449a7b11 100644 --- a/cli/tests/unit_node/vm_test.ts +++ b/cli/tests/unit_node/vm_test.ts @@ -1,9 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { isContext, runInNewContext } from "node:vm"; -import { - assertEquals, - assertThrows, -} from "../../../test_util/std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts"; Deno.test({ name: "vm runInNewContext", diff --git a/cli/tests/unit_node/worker_threads_test.ts b/cli/tests/unit_node/worker_threads_test.ts index b11361ad34..e790492298 100644 --- a/cli/tests/unit_node/worker_threads_test.ts +++ b/cli/tests/unit_node/worker_threads_test.ts @@ -4,8 +4,8 @@ import { assert, assertEquals, assertObjectMatch, -} from "../../../test_util/std/assert/mod.ts"; -import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts"; +} from "@test_util/std/assert/mod.ts"; +import { fromFileUrl, relative } from "@test_util/std/path/mod.ts"; import * as workerThreads from "node:worker_threads"; import { EventEmitter, once } from "node:events"; diff --git a/cli/tests/unit_node/zlib_test.ts b/cli/tests/unit_node/zlib_test.ts index b61cd4d4fc..31ebe0b4f6 100644 --- a/cli/tests/unit_node/zlib_test.ts +++ b/cli/tests/unit_node/zlib_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals } from "../../../test_util/std/assert/mod.ts"; -import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts"; +import { assert, assertEquals } from "@test_util/std/assert/mod.ts"; +import { fromFileUrl, relative } from "@test_util/std/path/mod.ts"; import { brotliCompress, brotliCompressSync,