diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-07-25 15:30:28 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 15:30:28 +1000 |
commit | 5f44148e83bb0056b7a361dd6a1bf28d11f3116d (patch) | |
tree | e73ff318a69cabedf33a962be6fa6c73e6775f3e /tests/unit_node | |
parent | 84b7504d0fdccc07b9f7412408c954ae07765ccb (diff) |
chore: update to `std@2024.07.19` (#24715)
Diffstat (limited to 'tests/unit_node')
80 files changed, 122 insertions, 136 deletions
diff --git a/tests/unit_node/_fs/_fs_access_test.ts b/tests/unit_node/_fs/_fs_access_test.ts index 713a8d9a7..f8010b0b8 100644 --- a/tests/unit_node/_fs/_fs_access_test.ts +++ b/tests/unit_node/_fs/_fs_access_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as fs from "node:fs"; -import { assertRejects, assertThrows } from "@std/assert/mod.ts"; +import { assertRejects, assertThrows } from "@std/assert"; Deno.test( "[node/fs.access] Uses the owner permission when the user is the owner", diff --git a/tests/unit_node/_fs/_fs_appendFile_test.ts b/tests/unit_node/_fs/_fs_appendFile_test.ts index edc4dfb94..f50eba856 100644 --- a/tests/unit_node/_fs/_fs_appendFile_test.ts +++ b/tests/unit_node/_fs/_fs_appendFile_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { appendFile, appendFileSync } from "node:fs"; -import { fromFileUrl } from "@std/path/mod.ts"; +import { fromFileUrl } from "@std/path"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; const decoder = new TextDecoder("utf-8"); diff --git a/tests/unit_node/_fs/_fs_chmod_test.ts b/tests/unit_node/_fs/_fs_chmod_test.ts index 90ab6761b..97dc9ecdd 100644 --- a/tests/unit_node/_fs/_fs_chmod_test.ts +++ b/tests/unit_node/_fs/_fs_chmod_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertRejects, assertThrows, fail } from "@std/assert/mod.ts"; +import { assert, assertRejects, assertThrows, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chmod, chmodSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_chown_test.ts b/tests/unit_node/_fs/_fs_chown_test.ts index 6059e882d..6cb2f576a 100644 --- a/tests/unit_node/_fs/_fs_chown_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { chown, chownSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_close_test.ts b/tests/unit_node/_fs/_fs_close_test.ts index 085f387c6..e41711126 100644 --- a/tests/unit_node/_fs/_fs_close_test.ts +++ b/tests/unit_node/_fs/_fs_close_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertThrows, fail } from "@std/assert/mod.ts"; +import { assert, assertThrows, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { close, closeSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_copy_test.ts b/tests/unit_node/_fs/_fs_copy_test.ts index adc002187..22f30ea37 100644 --- a/tests/unit_node/_fs/_fs_copy_test.ts +++ b/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 "@std/path/mod.ts"; -import { assert } from "@std/assert/mod.ts"; +import * as path from "@std/path"; +import { assert } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { copyFile, copyFileSync, cpSync, existsSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_dir_test.ts b/tests/unit_node/_fs/_fs_dir_test.ts index e108960fa..0f41543e9 100644 --- a/tests/unit_node/_fs/_fs_dir_test.ts +++ b/tests/unit_node/_fs/_fs_dir_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, fail } from "@std/assert/mod.ts"; +import { assert, assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { Dir as DirOrig, type Dirent } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_dirent_test.ts b/tests/unit_node/_fs/_fs_dirent_test.ts index 853888925..093617faf 100644 --- a/tests/unit_node/_fs/_fs_dirent_test.ts +++ b/tests/unit_node/_fs/_fs_dirent_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assert, assertEquals, assertThrows } from "@std/assert"; import { Dirent as Dirent_ } from "node:fs"; // deno-lint-ignore no-explicit-any diff --git a/tests/unit_node/_fs/_fs_exists_test.ts b/tests/unit_node/_fs/_fs_exists_test.ts index 04411e61b..7ed7584ae 100644 --- a/tests/unit_node/_fs/_fs_exists_test.ts +++ b/tests/unit_node/_fs/_fs_exists_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, assertStringIncludes } from "@std/assert/mod.ts"; +import { assert, assertEquals, assertStringIncludes } from "@std/assert"; import { exists, existsSync } from "node:fs"; import { promisify } from "node:util"; diff --git a/tests/unit_node/_fs/_fs_fdatasync_test.ts b/tests/unit_node/_fs/_fs_fdatasync_test.ts index 2c054cac3..6e0143d64 100644 --- a/tests/unit_node/_fs/_fs_fdatasync_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { fdatasync, fdatasyncSync } from "node:fs"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_fstat_test.ts b/tests/unit_node/_fs/_fs_fstat_test.ts index b0c767bcf..46ab508cf 100644 --- a/tests/unit_node/_fs/_fs_fstat_test.ts +++ b/tests/unit_node/_fs/_fs_fstat_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { fstat, fstatSync } from "node:fs"; -import { fail } from "@std/assert/mod.ts"; +import { fail } from "@std/assert"; import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts"; import type { BigIntStats, Stats } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_fsync_test.ts b/tests/unit_node/_fs/_fs_fsync_test.ts index 855abcd16..3a162f97c 100644 --- a/tests/unit_node/_fs/_fs_fsync_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { fsync, fsyncSync } from "node:fs"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_ftruncate_test.ts b/tests/unit_node/_fs/_fs_ftruncate_test.ts index 238f51c0c..78cbe630a 100644 --- a/tests/unit_node/_fs/_fs_ftruncate_test.ts +++ b/tests/unit_node/_fs/_fs_ftruncate_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { ftruncate, ftruncateSync } from "node:fs"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_futimes_test.ts b/tests/unit_node/_fs/_fs_futimes_test.ts index 2f9bd516f..48f949b1a 100644 --- a/tests/unit_node/_fs/_fs_futimes_test.ts +++ b/tests/unit_node/_fs/_fs_futimes_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { futimes, futimesSync } from "node:fs"; const randomDate = new Date(Date.now() + 1000); diff --git a/tests/unit_node/_fs/_fs_handle_test.ts b/tests/unit_node/_fs/_fs_handle_test.ts index 91dabbece..ea6af9c29 100644 --- a/tests/unit_node/_fs/_fs_handle_test.ts +++ b/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 "@std/path/mod.ts"; +import * as path from "@std/path"; import { Buffer } from "node:buffer"; import * as fs from "node:fs/promises"; -import { assert, assertEquals } from "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); diff --git a/tests/unit_node/_fs/_fs_link_test.ts b/tests/unit_node/_fs/_fs_link_test.ts index aad025413..3062db7a6 100644 --- a/tests/unit_node/_fs/_fs_link_test.ts +++ b/tests/unit_node/_fs/_fs_link_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import * as path from "@std/path/mod.ts"; -import { assert, assertEquals, fail } from "@std/assert/mod.ts"; +import * as path from "@std/path"; +import { assert, assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { link, linkSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_lstat_test.ts b/tests/unit_node/_fs/_fs_lstat_test.ts index 2887cf23b..6a4244345 100644 --- a/tests/unit_node/_fs/_fs_lstat_test.ts +++ b/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 "@std/assert/mod.ts"; +import { fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts"; import type { BigIntStats, Stats } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_mkdir_test.ts b/tests/unit_node/_fs/_fs_mkdir_test.ts index 874e9f856..b9f6adf44 100644 --- a/tests/unit_node/_fs/_fs_mkdir_test.ts +++ b/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 "@std/path/mod.ts"; -import { assert } from "@std/assert/mod.ts"; +import * as path from "@std/path"; +import { assert } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { existsSync, mkdir, mkdirSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_mkdtemp_test.ts b/tests/unit_node/_fs/_fs_mkdtemp_test.ts index 3021a52af..47530b495 100644 --- a/tests/unit_node/_fs/_fs_mkdtemp_test.ts +++ b/tests/unit_node/_fs/_fs_mkdtemp_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertRejects, assertThrows } from "@std/assert/mod.ts"; +import { assert, assertRejects, assertThrows } from "@std/assert"; import { EncodingOption, existsSync, mkdtemp, mkdtempSync } from "node:fs"; import { env } from "node:process"; import { promisify } from "node:util"; diff --git a/tests/unit_node/_fs/_fs_open_test.ts b/tests/unit_node/_fs/_fs_open_test.ts index 3f0750382..b4679cbab 100644 --- a/tests/unit_node/_fs/_fs_open_test.ts +++ b/tests/unit_node/_fs/_fs_open_test.ts @@ -9,7 +9,7 @@ import { O_TRUNC, O_WRONLY, } from "node:constants"; -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { open, openSync } from "node:fs"; import { join, parse } from "node:path"; diff --git a/tests/unit_node/_fs/_fs_opendir_test.ts b/tests/unit_node/_fs/_fs_opendir_test.ts index 74a5438b4..e22a47a70 100644 --- a/tests/unit_node/_fs/_fs_opendir_test.ts +++ b/tests/unit_node/_fs/_fs_opendir_test.ts @@ -6,7 +6,7 @@ import { assertFalse, assertInstanceOf, assertThrows, -} from "@std/assert/mod.ts"; +} from "@std/assert"; import { opendir, opendirSync } from "node:fs"; import { Buffer } from "node:buffer"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; diff --git a/tests/unit_node/_fs/_fs_readFile_test.ts b/tests/unit_node/_fs/_fs_readFile_test.ts index 9f07690bc..ea36b9d86 100644 --- a/tests/unit_node/_fs/_fs_readFile_test.ts +++ b/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 "@std/path/mod.ts"; -import { assert, assertEquals } from "@std/assert/mod.ts"; +import * as path from "@std/path"; +import { assert, assertEquals } from "@std/assert"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); diff --git a/tests/unit_node/_fs/_fs_read_test.ts b/tests/unit_node/_fs/_fs_read_test.ts index 77311f7f3..42e8fed73 100644 --- a/tests/unit_node/_fs/_fs_read_test.ts +++ b/tests/unit_node/_fs/_fs_read_test.ts @@ -4,11 +4,11 @@ import { assertFalse, assertMatch, assertStrictEquals, -} from "@std/assert/mod.ts"; +} from "@std/assert"; import { read, readSync } from "node:fs"; import { open, openSync } from "node:fs"; import { Buffer } from "node:buffer"; -import * as path from "@std/path/mod.ts"; +import * as path from "@std/path"; import { closeSync } from "node:fs"; async function readTest( diff --git a/tests/unit_node/_fs/_fs_readdir_test.ts b/tests/unit_node/_fs/_fs_readdir_test.ts index b54e15816..8e5b46fc8 100644 --- a/tests/unit_node/_fs/_fs_readdir_test.ts +++ b/tests/unit_node/_fs/_fs_readdir_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertNotEquals, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertNotEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { readdir, readdirSync } from "node:fs"; -import { join } from "@std/path/mod.ts"; +import { join } from "@std/path"; Deno.test({ name: "ASYNC: reading empty directory", diff --git a/tests/unit_node/_fs/_fs_readlink_test.ts b/tests/unit_node/_fs/_fs_readlink_test.ts index f955d09a1..23c5e3896 100644 --- a/tests/unit_node/_fs/_fs_readlink_test.ts +++ b/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 "@std/assert/mod.ts"; -import * as path from "@std/path/mod.ts"; +import { assert, assertEquals } from "@std/assert"; +import * as path from "@std/path"; const testDir = Deno.makeTempDirSync(); const oldname = path.join(testDir, "oldname"); diff --git a/tests/unit_node/_fs/_fs_realpath_test.ts b/tests/unit_node/_fs/_fs_realpath_test.ts index 1fabfe779..b0285cf54 100644 --- a/tests/unit_node/_fs/_fs_realpath_test.ts +++ b/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 "@std/path/mod.ts"; -import { assertEquals } from "@std/assert/mod.ts"; +import * as path from "@std/path"; +import { assertEquals } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { realpath, realpathSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_rename_test.ts b/tests/unit_node/_fs/_fs_rename_test.ts index d8392b9e7..76d2e1314 100644 --- a/tests/unit_node/_fs/_fs_rename_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { rename, renameSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join, parse } from "@std/path/mod.ts"; +import { join, parse } from "@std/path"; Deno.test({ name: "ASYNC: renaming a file", diff --git a/tests/unit_node/_fs/_fs_rm_test.ts b/tests/unit_node/_fs/_fs_rm_test.ts index 64aa378b6..6ded2e564 100644 --- a/tests/unit_node/_fs/_fs_rm_test.ts +++ b/tests/unit_node/_fs/_fs_rm_test.ts @@ -1,13 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assertEquals, - assertRejects, - assertThrows, - fail, -} from "@std/assert/mod.ts"; +import { assertEquals, assertRejects, assertThrows, fail } from "@std/assert"; import { rm, rmSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join } from "@std/path/mod.ts"; +import { join } from "@std/path"; Deno.test({ name: "ASYNC: removing empty folder", diff --git a/tests/unit_node/_fs/_fs_rmdir_test.ts b/tests/unit_node/_fs/_fs_rmdir_test.ts index 1045882c7..db0c692a4 100644 --- a/tests/unit_node/_fs/_fs_rmdir_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { rmdir, rmdirSync } from "node:fs"; import { existsSync } from "node:fs"; -import { join } from "@std/path/mod.ts"; +import { join } from "@std/path"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_stat_test.ts b/tests/unit_node/_fs/_fs_stat_test.ts index 2f9ab5214..09d78f9db 100644 --- a/tests/unit_node/_fs/_fs_stat_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; export function assertStats(actual: Stats, expected: Deno.FileInfo) { assertEquals(actual.dev, expected.dev); diff --git a/tests/unit_node/_fs/_fs_statfs_test.ts b/tests/unit_node/_fs/_fs_statfs_test.ts index fde1c8fed..fc85bcf17 100644 --- a/tests/unit_node/_fs/_fs_statfs_test.ts +++ b/tests/unit_node/_fs/_fs_statfs_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as fs from "node:fs"; -import { assertEquals, assertRejects } from "@std/assert/mod.ts"; -import * as path from "@std/path/mod.ts"; +import { assertEquals, assertRejects } from "@std/assert"; +import * as path from "@std/path"; function assertStatFs( statFs: fs.StatsFsBase<unknown>, diff --git a/tests/unit_node/_fs/_fs_symlink_test.ts b/tests/unit_node/_fs/_fs_symlink_test.ts index 98cf51460..dfd6adb51 100644 --- a/tests/unit_node/_fs/_fs_symlink_test.ts +++ b/tests/unit_node/_fs/_fs_symlink_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertThrows, fail } from "@std/assert/mod.ts"; +import { assert, assertThrows, fail } from "@std/assert"; import { symlink, symlinkSync } from "node:fs"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_truncate_test.ts b/tests/unit_node/_fs/_fs_truncate_test.ts index 9fb8a8bf2..67bd021e4 100644 --- a/tests/unit_node/_fs/_fs_truncate_test.ts +++ b/tests/unit_node/_fs/_fs_truncate_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { truncate, truncateSync } from "node:fs"; Deno.test({ diff --git a/tests/unit_node/_fs/_fs_unlink_test.ts b/tests/unit_node/_fs/_fs_unlink_test.ts index 7377f5c87..f96217f8e 100644 --- a/tests/unit_node/_fs/_fs_unlink_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals, fail } from "@std/assert"; import { existsSync } from "node:fs"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { unlink, unlinkSync } from "node:fs"; diff --git a/tests/unit_node/_fs/_fs_utimes_test.ts b/tests/unit_node/_fs/_fs_utimes_test.ts index 4b805c923..717d511c0 100644 --- a/tests/unit_node/_fs/_fs_utimes_test.ts +++ b/tests/unit_node/_fs/_fs_utimes_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows, fail } from "@std/assert"; import { utimes, utimesSync } from "node:fs"; const randomDate = new Date(Date.now() + 1000); diff --git a/tests/unit_node/_fs/_fs_watch_test.ts b/tests/unit_node/_fs/_fs_watch_test.ts index 8e2fb619c..c6082d77f 100644 --- a/tests/unit_node/_fs/_fs_watch_test.ts +++ b/tests/unit_node/_fs/_fs_watch_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { unwatchFile, watch, watchFile } from "node:fs"; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; function wait(time: number) { return new Promise((resolve) => { diff --git a/tests/unit_node/_fs/_fs_writeFile_test.ts b/tests/unit_node/_fs/_fs_writeFile_test.ts index 2310dac68..53af660cf 100644 --- a/tests/unit_node/_fs/_fs_writeFile_test.ts +++ b/tests/unit_node/_fs/_fs_writeFile_test.ts @@ -5,9 +5,9 @@ import { assertNotEquals, assertRejects, assertThrows, -} from "@std/assert/mod.ts"; +} from "@std/assert"; import { writeFile, writeFileSync } from "node:fs"; -import * as path from "@std/path/mod.ts"; +import * as path from "@std/path"; type TextEncodings = | "ascii" diff --git a/tests/unit_node/_fs/_fs_write_test.ts b/tests/unit_node/_fs/_fs_write_test.ts index 148bc40e7..ab82d4f5b 100644 --- a/tests/unit_node/_fs/_fs_write_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { Buffer } from "node:buffer"; const decoder = new TextDecoder("utf-8"); diff --git a/tests/unit_node/_test_utils.ts b/tests/unit_node/_test_utils.ts index 0aa2c8521..d9dd4e5d5 100644 --- a/tests/unit_node/_test_utils.ts +++ b/tests/unit_node/_test_utils.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertStringIncludes } from "@std/assert/mod.ts"; +import { assert, assertStringIncludes } from "@std/assert"; /** Asserts that an error thrown in a callback will not be wrongly caught. */ export async function assertCallbackErrorUncaught( diff --git a/tests/unit_node/assertion_error_test.ts b/tests/unit_node/assertion_error_test.ts index 6cce7a4ac..4f8fe70ba 100644 --- a/tests/unit_node/assertion_error_test.ts +++ b/tests/unit_node/assertion_error_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { stripColor } from "@std/fmt/colors.ts"; -import { assert, assertStrictEquals } from "@std/assert/mod.ts"; +import { stripAnsiCode } from "@std/fmt/colors"; +import { assert, assertStrictEquals } from "@std/assert"; import { AssertionError } from "node:assert"; Deno.test({ @@ -31,7 +31,7 @@ Deno.test({ { actual: 1, expected: 2, operator: "equal" }, ); assertStrictEquals(err.name, "AssertionError"); - assertStrictEquals(stripColor(err.message), "1 equal 2"); + assertStrictEquals(stripAnsiCode(err.message), "1 equal 2"); assertStrictEquals(err.generatedMessage, true); assertStrictEquals(err.code, "ERR_ASSERTION"); assertStrictEquals(err.actual, 1); @@ -51,7 +51,7 @@ Deno.test({ stackStartFn, }); assertStrictEquals(err.name, "AssertionError"); - assertStrictEquals(stripColor(err.message), `'deno' match /node/`); + assertStrictEquals(stripAnsiCode(err.message), `'deno' match /node/`); assertStrictEquals(err.generatedMessage, true); assertStrictEquals(err.code, "ERR_ASSERTION"); assertStrictEquals(err.actual, "deno"); diff --git a/tests/unit_node/async_hooks_test.ts b/tests/unit_node/async_hooks_test.ts index 46d7dd785..f153f6753 100644 --- a/tests/unit_node/async_hooks_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; Deno.test(async function foo() { const asyncLocalStorage = new AsyncLocalStorage(); diff --git a/tests/unit_node/buffer_test.ts b/tests/unit_node/buffer_test.ts index 07f5dd2c1..bd7f6edb1 100644 --- a/tests/unit_node/buffer_test.ts +++ b/tests/unit_node/buffer_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { Buffer } from "node:buffer"; -import { assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@std/assert"; Deno.test({ name: "[node/buffer] alloc fails if size is not a number", diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts index 23de928db..cfac0b5a9 100644 --- a/tests/unit_node/child_process_test.ts +++ b/tests/unit_node/child_process_test.ts @@ -9,8 +9,8 @@ import { assertNotStrictEquals, assertStrictEquals, assertStringIncludes, -} from "@std/assert/mod.ts"; -import * as path from "@std/path/mod.ts"; +} from "@std/assert"; +import * as path from "@std/path"; const { spawn, spawnSync, execFile, execFileSync, ChildProcess } = CP; diff --git a/tests/unit_node/console_test.ts b/tests/unit_node/console_test.ts index f79dcc436..25d4a78e5 100644 --- a/tests/unit_node/console_test.ts +++ b/tests/unit_node/console_test.ts @@ -1,18 +1,18 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import vm from "node:vm"; -import { stripColor } from "@std/fmt/colors.ts"; -import { assertStringIncludes } from "@std/assert/mod.ts"; +import { stripAnsiCode } from "@std/fmt/colors"; +import { assertStringIncludes } from "@std/assert"; Deno.test(function inspectCrossRealmObjects() { assertStringIncludes( - stripColor( + stripAnsiCode( Deno.inspect(vm.runInNewContext(`new Error("This is an error")`)), ), "Error: This is an error", ); assertStringIncludes( - stripColor( + stripAnsiCode( Deno.inspect( vm.runInNewContext(`new AggregateError([], "This is an error")`), ), @@ -20,7 +20,7 @@ Deno.test(function inspectCrossRealmObjects() { "AggregateError: This is an error", ); assertStringIncludes( - stripColor( + stripAnsiCode( Deno.inspect(vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)), ), "2018-12-10T02:26:59.002Z", diff --git a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts b/tests/unit_node/crypto/crypto_cipher_gcm_test.ts index f25c81036..e87ae23f0 100644 --- a/tests/unit_node/crypto/crypto_cipher_gcm_test.ts +++ b/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" with { type: "json" }; import testVectors256 from "./gcmEncryptExtIV256.json" with { type: "json" }; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; const aesGcm = (bits: string, key: Uint8Array) => { const ALGO = bits == "128" ? `aes-128-gcm` : `aes-256-gcm`; diff --git a/tests/unit_node/crypto/crypto_cipher_test.ts b/tests/unit_node/crypto/crypto_cipher_test.ts index ab8bb4d37..91227cf00 100644 --- a/tests/unit_node/crypto/crypto_cipher_test.ts +++ b/tests/unit_node/crypto/crypto_cipher_test.ts @@ -3,7 +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 "@std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@std/assert"; const rsaPrivateKey = Deno.readTextFileSync( new URL("../testdata/rsa_private.pem", import.meta.url), diff --git a/tests/unit_node/crypto/crypto_hash_test.ts b/tests/unit_node/crypto/crypto_hash_test.ts index 96bc1d51b..0d4e30709 100644 --- a/tests/unit_node/crypto/crypto_hash_test.ts +++ b/tests/unit_node/crypto/crypto_hash_test.ts @@ -2,7 +2,7 @@ import { createHash, createHmac, getHashes } from "node:crypto"; import { Buffer } from "node:buffer"; import { Readable } from "node:stream"; -import { assert, assertEquals } from "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; // https://github.com/denoland/deno/issues/18140 Deno.test({ diff --git a/tests/unit_node/crypto/crypto_hkdf_test.ts b/tests/unit_node/crypto/crypto_hkdf_test.ts index be5d99086..34102fd03 100644 --- a/tests/unit_node/crypto/crypto_hkdf_test.ts +++ b/tests/unit_node/crypto/crypto_hkdf_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { hkdfSync } from "node:crypto"; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { Buffer } from "node:buffer"; import nodeFixtures from "../testdata/crypto_digest_fixtures.json" with { type: "json", diff --git a/tests/unit_node/crypto/crypto_key_test.ts b/tests/unit_node/crypto/crypto_key_test.ts index d3a43b3b8..6365119e2 100644 --- a/tests/unit_node/crypto/crypto_key_test.ts +++ b/tests/unit_node/crypto/crypto_key_test.ts @@ -15,7 +15,7 @@ import { } from "node:crypto"; import { promisify } from "node:util"; import { Buffer } from "node:buffer"; -import { assert, assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assert, assertEquals, assertThrows } from "@std/assert"; const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1"; diff --git a/tests/unit_node/crypto/crypto_pbkdf2_test.ts b/tests/unit_node/crypto/crypto_pbkdf2_test.ts index 8ace870cb..c937eb0c4 100644 --- a/tests/unit_node/crypto/crypto_pbkdf2_test.ts +++ b/tests/unit_node/crypto/crypto_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 "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import nodeFixtures from "../testdata/crypto_digest_fixtures.json" with { type: "json", }; diff --git a/tests/unit_node/crypto/crypto_scrypt_test.ts b/tests/unit_node/crypto/crypto_scrypt_test.ts index c128abb92..03c08909e 100644 --- a/tests/unit_node/crypto/crypto_scrypt_test.ts +++ b/tests/unit_node/crypto/crypto_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 "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; Deno.test("scrypt works correctly", async () => { const { promise, resolve } = Promise.withResolvers<boolean>(); diff --git a/tests/unit_node/crypto/crypto_sign_test.ts b/tests/unit_node/crypto/crypto_sign_test.ts index 77c5caf75..557eea08e 100644 --- a/tests/unit_node/crypto/crypto_sign_test.ts +++ b/tests/unit_node/crypto/crypto_sign_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals } from "@std/testing/asserts.ts"; +import { assert, assertEquals } from "@std/assert"; import { createSign, createVerify, sign, verify } from "node:crypto"; import { Buffer } from "node:buffer"; import fixtures from "../testdata/crypto_digest_fixtures.json" with { diff --git a/tests/unit_node/dgram_test.ts b/tests/unit_node/dgram_test.ts index 10c8e5253..2ccdfbfb7 100644 --- a/tests/unit_node/dgram_test.ts +++ b/tests/unit_node/dgram_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { execCode } from "../unit/test_util.ts"; import { createSocket } from "node:dgram"; diff --git a/tests/unit_node/domain_test.ts b/tests/unit_node/domain_test.ts index 88c2b4b47..ddc56efae 100644 --- a/tests/unit_node/domain_test.ts +++ b/tests/unit_node/domain_test.ts @@ -4,7 +4,7 @@ import domain from "node:domain"; import { EventEmitter } from "node:events"; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; Deno.test("should work on throws", async function () { const deferred = Promise.withResolvers<void>(); diff --git a/tests/unit_node/fs_test.ts b/tests/unit_node/fs_test.ts index 1b121c71f..c94a2447e 100644 --- a/tests/unit_node/fs_test.ts +++ b/tests/unit_node/fs_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assert, assertEquals, assertThrows } from "@std/assert"; import { join } from "node:path"; import { tmpdir } from "node:os"; import { diff --git a/tests/unit_node/http2_test.ts b/tests/unit_node/http2_test.ts index 968ef15a0..67c2497d5 100644 --- a/tests/unit_node/http2_test.ts +++ b/tests/unit_node/http2_test.ts @@ -5,7 +5,7 @@ import { Buffer } from "node:buffer"; import { readFile } from "node:fs/promises"; import { join } from "node:path"; import * as net from "node:net"; -import { assert, assertEquals } from "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { curlRequest } from "../unit/test_util.ts"; for (const url of ["http://127.0.0.1:4246", "https://127.0.0.1:4247"]) { diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index 3831cac06..c9a1ec3ea 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -7,9 +7,9 @@ import https from "node:https"; import net from "node:net"; import fs from "node:fs"; -import { assert, assertEquals, fail } from "@std/assert/mod.ts"; -import { assertSpyCalls, spy } from "@std/testing/mock.ts"; -import { fromFileUrl, relative } from "@std/path/mod.ts"; +import { assert, assertEquals, fail } from "@std/assert"; +import { assertSpyCalls, spy } from "@std/testing/mock"; +import { fromFileUrl, relative } from "@std/path"; import { gzip } from "node:zlib"; import { Buffer } from "node:buffer"; diff --git a/tests/unit_node/internal/_randomBytes_test.ts b/tests/unit_node/internal/_randomBytes_test.ts index 4d6f5c39a..ff3acf5e3 100644 --- a/tests/unit_node/internal/_randomBytes_test.ts +++ b/tests/unit_node/internal/_randomBytes_test.ts @@ -1,10 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { - assert, - assertEquals, - assertRejects, - assertThrows, -} from "@std/assert/mod.ts"; +import { assert, assertEquals, assertRejects, assertThrows } from "@std/assert"; import { assertCallbackErrorUncaught } from "../_test_utils.ts"; import { pseudoRandomBytes, randomBytes } from "node:crypto"; diff --git a/tests/unit_node/internal/_randomFill_test.ts b/tests/unit_node/internal/_randomFill_test.ts index 438e6e42d..7b590666c 100644 --- a/tests/unit_node/internal/_randomFill_test.ts +++ b/tests/unit_node/internal/_randomFill_test.ts @@ -1,11 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { Buffer } from "node:buffer"; import { randomFill, randomFillSync } from "node:crypto"; -import { - assertEquals, - assertNotEquals, - assertThrows, -} from "@std/assert/mod.ts"; +import { assertEquals, assertNotEquals, assertThrows } from "@std/assert"; const validateNonZero = (buf: Buffer) => { if (!buf.some((ch) => ch > 0)) throw new Error("Error"); diff --git a/tests/unit_node/internal/_randomInt_test.ts b/tests/unit_node/internal/_randomInt_test.ts index 1d2610268..b0d9d771e 100644 --- a/tests/unit_node/internal/_randomInt_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assert, assertThrows } from "@std/assert"; const between = (x: number, min: number, max: number) => x >= min && x < max; diff --git a/tests/unit_node/module_test.ts b/tests/unit_node/module_test.ts index c17aabc72..25249101a 100644 --- a/tests/unit_node/module_test.ts +++ b/tests/unit_node/module_test.ts @@ -7,7 +7,7 @@ import { isBuiltin, Module, } from "node:module"; -import { assert, assertEquals } from "@std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import process from "node:process"; import * as path from "node:path"; diff --git a/tests/unit_node/net_test.ts b/tests/unit_node/net_test.ts index ebbc749b5..521de1e73 100644 --- a/tests/unit_node/net_test.ts +++ b/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 "@std/assert/mod.ts"; -import * as path from "@std/path/mod.ts"; +import { assert, assertEquals } from "@std/assert"; +import * as path from "@std/path"; import * as http from "node:http"; Deno.test("[node/net] close event emits after error event - when host is not found", async () => { diff --git a/tests/unit_node/os_test.ts b/tests/unit_node/os_test.ts index 810c22518..a75b66807 100644 --- a/tests/unit_node/os_test.ts +++ b/tests/unit_node/os_test.ts @@ -7,7 +7,7 @@ import { assertEquals, assertNotEquals, assertThrows, -} from "@std/assert/mod.ts"; +} from "@std/assert"; Deno.test({ name: "build architecture is a string", diff --git a/tests/unit_node/path_test.ts b/tests/unit_node/path_test.ts index 0313c60ed..bd0711334 100644 --- a/tests/unit_node/path_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertStrictEquals } from "@std/assert"; Deno.test("[node/path] posix and win32 objects", () => { assertStrictEquals(path.posix, posix); diff --git a/tests/unit_node/perf_hooks_test.ts b/tests/unit_node/perf_hooks_test.ts index 1b066a42b..d5b900041 100644 --- a/tests/unit_node/perf_hooks_test.ts +++ b/tests/unit_node/perf_hooks_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as perfHooks from "node:perf_hooks"; import { performance, PerformanceObserver } from "node:perf_hooks"; -import { assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@std/assert"; Deno.test({ name: "[perf_hooks] performance", diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index e15d37744..cc9e4dbd4 100644 --- a/tests/unit_node/process_test.ts +++ b/tests/unit_node/process_test.ts @@ -21,10 +21,10 @@ import { assertStrictEquals, assertThrows, fail, -} from "@std/assert/mod.ts"; -import { stripColor } from "@std/fmt/colors.ts"; -import * as path from "@std/path/mod.ts"; -import { delay } from "@std/async/delay.ts"; +} from "@std/assert"; +import { stripAnsiCode } from "@std/fmt/colors"; +import * as path from "@std/path"; +import { delay } from "@std/async/delay"; const testDir = new URL(".", import.meta.url); @@ -178,7 +178,7 @@ Deno.test({ const { stdout } = await command.output(); const decoder = new TextDecoder(); - assertEquals(stripColor(decoder.decode(stdout).trim()), "1\n2"); + assertEquals(stripAnsiCode(decoder.decode(stdout).trim()), "1\n2"); }, }); @@ -897,7 +897,7 @@ Deno.test({ const { stdout } = await command.output(); const decoder = new TextDecoder(); - assertEquals(stripColor(decoder.decode(stdout).trim()), "exit"); + assertEquals(stripAnsiCode(decoder.decode(stdout).trim()), "exit"); }, }); @@ -916,7 +916,7 @@ Deno.test({ const { stdout } = await command.output(); const decoder = new TextDecoder(); - assertEquals(stripColor(decoder.decode(stdout).trim()), "really exited"); + assertEquals(stripAnsiCode(decoder.decode(stdout).trim()), "really exited"); }, }); diff --git a/tests/unit_node/punycode_test.ts b/tests/unit_node/punycode_test.ts index baf1b57f6..fffa26164 100644 --- a/tests/unit_node/punycode_test.ts +++ b/tests/unit_node/punycode_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import * as punycode from "node:punycode"; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; Deno.test("regression #19214", () => { const input = "δΈͺ\uFFFD\uFFFD.hk"; diff --git a/tests/unit_node/querystring_test.ts b/tests/unit_node/querystring_test.ts index 7a97b3b9a..09672df37 100644 --- a/tests/unit_node/querystring_test.ts +++ b/tests/unit_node/querystring_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"; import { parse, stringify } from "node:querystring"; Deno.test({ diff --git a/tests/unit_node/readline_test.ts b/tests/unit_node/readline_test.ts index b9a732548..68f0cd7c9 100644 --- a/tests/unit_node/readline_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertInstanceOf } from "@std/assert"; import { Readable, Writable } from "node:stream"; Deno.test("[node/readline] createInstance", () => { diff --git a/tests/unit_node/repl_test.ts b/tests/unit_node/repl_test.ts index 16c9c23f2..693fdcc9e 100644 --- a/tests/unit_node/repl_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assert } from "@std/assert"; Deno.test({ name: "repl module exports", diff --git a/tests/unit_node/stream_test.ts b/tests/unit_node/stream_test.ts index 08f3831e5..a54f8b421 100644 --- a/tests/unit_node/stream_test.ts +++ b/tests/unit_node/stream_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assert } from "@std/assert/mod.ts"; -import { fromFileUrl, relative } from "@std/path/mod.ts"; +import { assert } from "@std/assert"; +import { fromFileUrl, relative } from "@std/path"; import { pipeline } from "node:stream/promises"; import { createReadStream, createWriteStream } from "node:fs"; diff --git a/tests/unit_node/string_decoder_test.ts b/tests/unit_node/string_decoder_test.ts index 479ee01c0..34fbdd881 100644 --- a/tests/unit_node/string_decoder_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { Buffer } from "node:buffer"; import { StringDecoder } from "node:string_decoder"; diff --git a/tests/unit_node/timers_test.ts b/tests/unit_node/timers_test.ts index 5a7668be7..90c6fb150 100644 --- a/tests/unit_node/timers_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assert, fail } from "@std/assert"; import * as timers from "node:timers"; import * as timersPromises from "node:timers/promises"; diff --git a/tests/unit_node/tls_test.ts b/tests/unit_node/tls_test.ts index a9dc10c20..6033efa31 100644 --- a/tests/unit_node/tls_test.ts +++ b/tests/unit_node/tls_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertInstanceOf } from "@std/assert/mod.ts"; -import { delay } from "@std/async/delay.ts"; -import { fromFileUrl, join } from "@std/path/mod.ts"; +import { assertEquals, assertInstanceOf } from "@std/assert"; +import { delay } from "@std/async/delay"; +import { fromFileUrl, join } from "@std/path"; import * as tls from "node:tls"; import * as net from "node:net"; import * as stream from "node:stream"; diff --git a/tests/unit_node/tty_test.ts b/tests/unit_node/tty_test.ts index cde05b9ff..ab3193f4a 100644 --- a/tests/unit_node/tty_test.ts +++ b/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 "@std/assert/mod.ts"; +import { assert } from "@std/assert"; import { isatty } from "node:tty"; import tty from "node:tty"; import process from "node:process"; diff --git a/tests/unit_node/util_test.ts b/tests/unit_node/util_test.ts index 85fa72741..f245a647a 100644 --- a/tests/unit_node/util_test.ts +++ b/tests/unit_node/util_test.ts @@ -5,8 +5,8 @@ import { assertEquals, assertStrictEquals, assertThrows, -} from "@std/assert/mod.ts"; -import { stripColor } from "@std/fmt/colors.ts"; +} from "@std/assert"; +import { stripAnsiCode } from "@std/fmt/colors"; import * as util from "node:util"; import { Buffer } from "node:buffer"; @@ -27,14 +27,14 @@ Deno.test({ Deno.test({ name: "[util] inspect", fn() { - assertEquals(stripColor(util.inspect({ foo: 123 })), "{ foo: 123 }"); - assertEquals(stripColor(util.inspect("foo")), "'foo'"); + assertEquals(stripAnsiCode(util.inspect({ foo: 123 })), "{ foo: 123 }"); + assertEquals(stripAnsiCode(util.inspect("foo")), "'foo'"); assertEquals( - stripColor(util.inspect("Deno's logo is so cute.")), + stripAnsiCode(util.inspect("Deno's logo is so cute.")), `"Deno's logo is so cute."`, ); assertEquals( - stripColor(util.inspect([1, 2, 3, 4, 5, 6, 7])), + stripAnsiCode(util.inspect([1, 2, 3, 4, 5, 6, 7])), `[ 1, 2, 3, 4, 5, 6, 7 diff --git a/tests/unit_node/v8_test.ts b/tests/unit_node/v8_test.ts index b91d595db..f7208fb0e 100644 --- a/tests/unit_node/v8_test.ts +++ b/tests/unit_node/v8_test.ts @@ -6,7 +6,7 @@ import { serialize, setFlagsFromString, } from "node:v8"; -import { assertEquals } from "@std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; // https://github.com/nodejs/node/blob/a2bbe5ff216bc28f8dac1c36a8750025a93c3827/test/parallel/test-v8-version-tag.js#L6 Deno.test({ diff --git a/tests/unit_node/vm_test.ts b/tests/unit_node/vm_test.ts index 46e231c6c..4c370931d 100644 --- a/tests/unit_node/vm_test.ts +++ b/tests/unit_node/vm_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assertThrows } from "@std/assert/mod.ts"; +import { assertEquals, assertThrows } from "@std/assert"; import { createContext, isContext, diff --git a/tests/unit_node/worker_threads_test.ts b/tests/unit_node/worker_threads_test.ts index 9991e5787..d9fe9f77d 100644 --- a/tests/unit_node/worker_threads_test.ts +++ b/tests/unit_node/worker_threads_test.ts @@ -6,8 +6,8 @@ import { assertObjectMatch, assertThrows, fail, -} from "@std/assert/mod.ts"; -import { fromFileUrl, relative, SEPARATOR } from "@std/path/mod.ts"; +} from "@std/assert"; +import { fromFileUrl, relative, SEPARATOR } from "@std/path"; import * as workerThreads from "node:worker_threads"; import { EventEmitter, once } from "node:events"; import process from "node:process"; diff --git a/tests/unit_node/zlib_test.ts b/tests/unit_node/zlib_test.ts index c7e9bbca9..215717dde 100644 --- a/tests/unit_node/zlib_test.ts +++ b/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 "@std/assert/mod.ts"; -import { fromFileUrl, relative } from "@std/path/mod.ts"; +import { assert, assertEquals } from "@std/assert"; +import { fromFileUrl, relative } from "@std/path"; import { brotliCompress, brotliCompressSync, |