mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
chore: use @std
import instead of @test_util/std
(#22398)
This PR: 1. Replaces `@test_util/std`-prefixed imports with `@std`. 2. Adds `@std/` import map entries to a few `deno.json` files.
This commit is contained in:
parent
d236fc8b43
commit
92f6188253
97 changed files with 148 additions and 175 deletions
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { partition } from "@test_util/std/collections/partition.ts";
|
import { partition } from "@std/collections/partition.ts";
|
||||||
import { join } from "@test_util/std/path/mod.ts";
|
import { join } from "@std/path/mod.ts";
|
||||||
import * as JSONC from "@test_util/std/jsonc/mod.ts";
|
import * as JSONC from "@std/jsonc/mod.ts";
|
||||||
/**
|
/**
|
||||||
* The test suite matches the folders inside the `test` folder inside the
|
* The test suite matches the folders inside the `test` folder inside the
|
||||||
* node repo
|
* node repo
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"@test_util/": "../../test_util/"
|
"@test_util/": "../../test_util/",
|
||||||
|
"@std/": "../../test_util/std/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import "./polyfill_globals.js";
|
import "./polyfill_globals.js";
|
||||||
import { createRequire } from "node:module";
|
import { createRequire } from "node:module";
|
||||||
import { toFileUrl } from "@test_util/std/path/mod.ts";
|
import { toFileUrl } from "@std/path/mod.ts";
|
||||||
const file = Deno.args[0];
|
const file = Deno.args[0];
|
||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error("No file provided");
|
throw new Error("No file provided");
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
* all share the same working directory.
|
* all share the same working directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { magenta } from "@test_util/std/fmt/colors.ts";
|
import { magenta } from "@std/fmt/colors.ts";
|
||||||
import { pooledMap } from "@test_util/std/async/pool.ts";
|
import { pooledMap } from "@std/async/pool.ts";
|
||||||
import { dirname, fromFileUrl, join } from "@test_util/std/path/mod.ts";
|
import { dirname, fromFileUrl, join } from "@std/path/mod.ts";
|
||||||
import { fail } from "@test_util/std/assert/mod.ts";
|
import { fail } from "@std/assert/mod.ts";
|
||||||
import {
|
import {
|
||||||
config,
|
config,
|
||||||
getPathsFromTestSuites,
|
getPathsFromTestSuites,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assert, assertEquals, assertStringIncludes } from "./test_util.ts";
|
import { assert, assertEquals, assertStringIncludes } from "./test_util.ts";
|
||||||
import { concat } from "@test_util/std/bytes/concat.ts";
|
import { concat } from "@std/bytes/concat.ts";
|
||||||
|
|
||||||
Deno.test(function blobString() {
|
Deno.test(function blobString() {
|
||||||
const b1 = new Blob(["Hello World"]);
|
const b1 = new Blob(["Hello World"]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test("BroadcastChannel worker", async () => {
|
Deno.test("BroadcastChannel worker", async () => {
|
||||||
const intercom = new BroadcastChannel("intercom");
|
const intercom = new BroadcastChannel("intercom");
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
assertStringIncludes,
|
assertStringIncludes,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { stripColor } from "@test_util/std/fmt/colors.ts";
|
import { stripColor } from "@std/fmt/colors.ts";
|
||||||
|
|
||||||
const customInspect = Symbol.for("Deno.customInspect");
|
const customInspect = Symbol.for("Deno.customInspect");
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
fail,
|
fail,
|
||||||
unimplemented,
|
unimplemented,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { Buffer } from "@test_util/std/io/buffer.ts";
|
import { Buffer } from "@std/io/buffer.ts";
|
||||||
|
|
||||||
const listenPort = 4506;
|
const listenPort = 4506;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { copy } from "@test_util/std/streams/copy.ts";
|
import { copy } from "@std/streams/copy.ts";
|
||||||
|
|
||||||
Deno.test(function filesStdioFileDescriptors() {
|
Deno.test(function filesStdioFileDescriptors() {
|
||||||
assertEquals(Deno.stdin.rid, 0);
|
assertEquals(Deno.stdin.rid, 0);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { Buffer, BufReader, BufWriter } from "@test_util/std/io/mod.ts";
|
import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
|
||||||
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
|
@ -10,7 +10,7 @@ import {
|
||||||
delay,
|
delay,
|
||||||
fail,
|
fail,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { join } from "@test_util/std/path/mod.ts";
|
import { join } from "@std/path/mod.ts";
|
||||||
|
|
||||||
const listenPort = 4507;
|
const listenPort = 4507;
|
||||||
const listenPort2 = 4508;
|
const listenPort2 = 4508;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertEquals } from "./test_util.ts";
|
import { assertEquals } from "./test_util.ts";
|
||||||
import { Buffer } from "@test_util/std/io/buffer.ts";
|
import { Buffer } from "@std/io/buffer.ts";
|
||||||
|
|
||||||
const DEFAULT_BUF_SIZE = 32 * 1024;
|
const DEFAULT_BUF_SIZE = 32 * 1024;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { assertType, IsExact } from "@test_util/std/testing/types.ts";
|
import { assertType, IsExact } from "@std/testing/types.ts";
|
||||||
|
|
||||||
const sleep = (time: number) => new Promise((r) => setTimeout(r, time));
|
const sleep = (time: number) => new Promise((r) => setTimeout(r, time));
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
// NOTE: these are just sometests to test the TypeScript types. Real coverage is
|
// NOTE: these are just sometests to test the TypeScript types. Real coverage is
|
||||||
// provided by WPT.
|
// provided by WPT.
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test("messagechannel", async () => {
|
Deno.test("messagechannel", async () => {
|
||||||
const mc = new MessageChannel();
|
const mc = new MessageChannel();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { assertMatch, assertRejects } from "@test_util/std/assert/mod.ts";
|
import { assertMatch, assertRejects } from "@std/assert/mod.ts";
|
||||||
import { Buffer, BufReader, BufWriter } from "@test_util/std/io/mod.ts";
|
import { Buffer, BufReader, BufWriter } from "@std/io/mod.ts";
|
||||||
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import * as colors from "@test_util/std/fmt/colors.ts";
|
import * as colors from "@std/fmt/colors.ts";
|
||||||
export { colors };
|
export { colors };
|
||||||
import { join, resolve } from "@test_util/std/path/mod.ts";
|
import { join, resolve } from "@std/path/mod.ts";
|
||||||
export {
|
export {
|
||||||
assert,
|
assert,
|
||||||
assertEquals,
|
assertEquals,
|
||||||
|
@ -19,10 +19,10 @@ export {
|
||||||
fail,
|
fail,
|
||||||
unimplemented,
|
unimplemented,
|
||||||
unreachable,
|
unreachable,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
export { delay } from "@test_util/std/async/delay.ts";
|
export { delay } from "@std/async/delay.ts";
|
||||||
export { readLines } from "@test_util/std/io/read_lines.ts";
|
export { readLines } from "@std/io/read_lines.ts";
|
||||||
export { parse as parseArgs } from "@test_util/std/flags/mod.ts";
|
export { parse as parseArgs } from "@std/flags/mod.ts";
|
||||||
|
|
||||||
export function pathToAbsoluteFileUrl(path: string): URL {
|
export function pathToAbsoluteFileUrl(path: string): URL {
|
||||||
path = resolve(path);
|
path = resolve(path);
|
||||||
|
|
|
@ -7,9 +7,9 @@ import {
|
||||||
assertStrictEquals,
|
assertStrictEquals,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "./test_util.ts";
|
} from "./test_util.ts";
|
||||||
import { BufReader, BufWriter } from "@test_util/std/io/mod.ts";
|
import { BufReader, BufWriter } from "@std/io/mod.ts";
|
||||||
import { readAll } from "@test_util/std/streams/read_all.ts";
|
import { readAll } from "@std/streams/read_all.ts";
|
||||||
import { writeAll } from "@test_util/std/streams/write_all.ts";
|
import { writeAll } from "@std/streams/write_all.ts";
|
||||||
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
import { TextProtoReader } from "../testdata/run/textproto.ts";
|
||||||
|
|
||||||
const encoder = new TextEncoder();
|
const encoder = new TextEncoder();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assert, assertEquals } from "./test_util.ts";
|
import { assert, assertEquals } from "./test_util.ts";
|
||||||
import { assertType, IsExact } from "@test_util/std/testing/types.ts";
|
import { assertType, IsExact } from "@std/testing/types.ts";
|
||||||
|
|
||||||
Deno.test(function urlPatternFromString() {
|
Deno.test(function urlPatternFromString() {
|
||||||
const pattern = new URLPattern("https://deno.land/foo/:bar");
|
const pattern = new URLPattern("https://deno.land/foo/:bar");
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
unreachable,
|
unreachable,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test("fragment", () => {
|
Deno.test("fragment", () => {
|
||||||
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
|
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertMatch,
|
assertMatch,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
|
|
||||||
function resolveWorker(worker: string): string {
|
function resolveWorker(worker: string): string {
|
||||||
return import.meta.resolve(`../testdata/workers/${worker}`);
|
return import.meta.resolve(`../testdata/workers/${worker}`);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
import { assertRejects, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertRejects, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test(
|
Deno.test(
|
||||||
"[node/fs.access] Uses the owner permission when the user is the owner",
|
"[node/fs.access] Uses the owner permission when the user is the owner",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { appendFile, appendFileSync } from "node:fs";
|
import { appendFile, appendFileSync } from "node:fs";
|
||||||
import { fromFileUrl } from "@test_util/std/path/mod.ts";
|
import { fromFileUrl } from "@std/path/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
|
|
||||||
const decoder = new TextDecoder("utf-8");
|
const decoder = new TextDecoder("utf-8");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import { assert, assertRejects, assertThrows, fail } from "@std/assert/mod.ts";
|
||||||
assert,
|
|
||||||
assertRejects,
|
|
||||||
assertThrows,
|
|
||||||
fail,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { chmod, chmodSync } from "node:fs";
|
import { chmod, chmodSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { chown, chownSync } from "node:fs";
|
import { chown, chownSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { close, closeSync } from "node:fs";
|
import { close, closeSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/path/mod.ts";
|
||||||
import { assert } from "@test_util/std/assert/mod.ts";
|
import { assert } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { copyFile, copyFileSync, existsSync } from "node:fs";
|
import { copyFile, copyFileSync, existsSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { Dir as DirOrig, type Dirent } from "node:fs";
|
import { Dir as DirOrig, type Dirent } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import { assert, assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
assert,
|
|
||||||
assertEquals,
|
|
||||||
assertThrows,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { Dirent as Dirent_ } from "node:fs";
|
import { Dirent as Dirent_ } from "node:fs";
|
||||||
|
|
||||||
// deno-lint-ignore no-explicit-any
|
// deno-lint-ignore no-explicit-any
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import { assert, assertEquals, assertStringIncludes } from "@std/assert/mod.ts";
|
||||||
assert,
|
|
||||||
assertEquals,
|
|
||||||
assertStringIncludes,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { exists, existsSync } from "node:fs";
|
import { exists, existsSync } from "node:fs";
|
||||||
import { promisify } from "node:util";
|
import { promisify } from "node:util";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { fdatasync, fdatasyncSync } from "node:fs";
|
import { fdatasync, fdatasyncSync } from "node:fs";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { fstat, fstatSync } from "node:fs";
|
import { fstat, fstatSync } from "node:fs";
|
||||||
import { fail } from "@test_util/std/assert/mod.ts";
|
import { fail } from "@std/assert/mod.ts";
|
||||||
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
|
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
|
||||||
import type { BigIntStats, Stats } from "node:fs";
|
import type { BigIntStats, Stats } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { fsync, fsyncSync } from "node:fs";
|
import { fsync, fsyncSync } from "node:fs";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { ftruncate, ftruncateSync } from "node:fs";
|
import { ftruncate, ftruncateSync } from "node:fs";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { futimes, futimesSync } from "node:fs";
|
import { futimes, futimesSync } from "node:fs";
|
||||||
|
|
||||||
const randomDate = new Date(Date.now() + 1000);
|
const randomDate = new Date(Date.now() + 1000);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/path/mod.ts";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import * as fs from "node:fs/promises";
|
import * as fs from "node:fs/promises";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
|
const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
|
||||||
const testData = path.resolve(moduleDir, "testdata", "hello.txt");
|
const testData = path.resolve(moduleDir, "testdata", "hello.txt");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/path/mod.ts";
|
||||||
import { assert, assertEquals, fail } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals, fail } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { link, linkSync } from "node:fs";
|
import { link, linkSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { lstat, lstatSync } from "node:fs";
|
import { lstat, lstatSync } from "node:fs";
|
||||||
import { fail } from "@test_util/std/assert/mod.ts";
|
import { fail } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
|
import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
|
||||||
import type { BigIntStats, Stats } from "node:fs";
|
import type { BigIntStats, Stats } from "node:fs";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/path/mod.ts";
|
||||||
import { assert } from "@test_util/std/assert/mod.ts";
|
import { assert } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { existsSync, mkdir, mkdirSync } from "node:fs";
|
import { existsSync, mkdir, mkdirSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import { assert, assertRejects, assertThrows } from "@std/assert/mod.ts";
|
||||||
assert,
|
|
||||||
assertRejects,
|
|
||||||
assertThrows,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { EncodingOption, existsSync, mkdtemp, mkdtempSync } from "node:fs";
|
import { EncodingOption, existsSync, mkdtemp, mkdtempSync } from "node:fs";
|
||||||
import { env } from "node:process";
|
import { env } from "node:process";
|
||||||
import { promisify } from "node:util";
|
import { promisify } from "node:util";
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
O_TRUNC,
|
O_TRUNC,
|
||||||
O_WRONLY,
|
O_WRONLY,
|
||||||
} from "node:constants";
|
} from "node:constants";
|
||||||
import { assertEquals, assertThrows, fail } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows, fail } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { open, openSync } from "node:fs";
|
import { open, openSync } from "node:fs";
|
||||||
import { join, parse } from "node:path";
|
import { join, parse } from "node:path";
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
assertFalse,
|
assertFalse,
|
||||||
assertInstanceOf,
|
assertInstanceOf,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { opendir, opendirSync } from "node:fs";
|
import { opendir, opendirSync } from "node:fs";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { promises, readFile, readFileSync } from "node:fs";
|
import { promises, readFile, readFileSync } from "node:fs";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
|
const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
|
||||||
const testData = path.resolve(moduleDir, "testdata", "hello.txt");
|
const testData = path.resolve(moduleDir, "testdata", "hello.txt");
|
||||||
|
|
|
@ -4,11 +4,11 @@ import {
|
||||||
assertFalse,
|
assertFalse,
|
||||||
assertMatch,
|
assertMatch,
|
||||||
assertStrictEquals,
|
assertStrictEquals,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { read, readSync } from "node:fs";
|
import { read, readSync } from "node:fs";
|
||||||
import { open, openSync } from "node:fs";
|
import { open, openSync } from "node:fs";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
import { closeSync } from "node:fs";
|
import { closeSync } from "node:fs";
|
||||||
|
|
||||||
async function readTest(
|
async function readTest(
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import {
|
import { assertEquals, assertNotEquals, fail } from "@std/assert/mod.ts";
|
||||||
assertEquals,
|
|
||||||
assertNotEquals,
|
|
||||||
fail,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { readdir, readdirSync } from "node:fs";
|
import { readdir, readdirSync } from "node:fs";
|
||||||
import { join } from "@test_util/std/path/mod.ts";
|
import { join } from "@std/path/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "ASYNC: reading empty directory",
|
name: "ASYNC: reading empty directory",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { readlink, readlinkSync } from "node:fs";
|
import { readlink, readlinkSync } from "node:fs";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
|
|
||||||
const testDir = Deno.makeTempDirSync();
|
const testDir = Deno.makeTempDirSync();
|
||||||
const oldname = path.join(testDir, "oldname");
|
const oldname = path.join(testDir, "oldname");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/path/mod.ts";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { realpath, realpathSync } from "node:fs";
|
import { realpath, realpathSync } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { rename, renameSync } from "node:fs";
|
import { rename, renameSync } from "node:fs";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
import { join, parse } from "@test_util/std/path/mod.ts";
|
import { join, parse } from "@std/path/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "ASYNC: renaming a file",
|
name: "ASYNC: renaming a file",
|
||||||
|
|
|
@ -4,10 +4,10 @@ import {
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
fail,
|
fail,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { rm, rmSync } from "node:fs";
|
import { rm, rmSync } from "node:fs";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
import { join } from "@test_util/std/path/mod.ts";
|
import { join } from "@std/path/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "ASYNC: removing empty folder",
|
name: "ASYNC: removing empty folder",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { rmdir, rmdirSync } from "node:fs";
|
import { rmdir, rmdirSync } from "node:fs";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
import { join } from "@test_util/std/path/mod.ts";
|
import { join } from "@std/path/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { BigIntStats, stat, Stats, statSync } from "node:fs";
|
import { BigIntStats, stat, Stats, statSync } from "node:fs";
|
||||||
import { assertEquals, fail } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, fail } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
export function assertStats(actual: Stats, expected: Deno.FileInfo) {
|
export function assertStats(actual: Stats, expected: Deno.FileInfo) {
|
||||||
assertEquals(actual.dev, expected.dev);
|
assertEquals(actual.dev, expected.dev);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { symlink, symlinkSync } from "node:fs";
|
import { symlink, symlinkSync } from "node:fs";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { truncate, truncateSync } from "node:fs";
|
import { truncate, truncateSync } from "node:fs";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { unlink, unlinkSync } from "node:fs";
|
import { unlink, unlinkSync } from "node:fs";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import { utimes, utimesSync } from "node:fs";
|
import { utimes, utimesSync } from "node:fs";
|
||||||
|
|
||||||
const randomDate = new Date(Date.now() + 1000);
|
const randomDate = new Date(Date.now() + 1000);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { watch } from "node:fs";
|
import { watch } from "node:fs";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
function wait(time: number) {
|
function wait(time: number) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import {
|
||||||
assertNotEquals,
|
assertNotEquals,
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { writeFile, writeFileSync } from "node:fs";
|
import { writeFile, writeFileSync } from "node:fs";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
|
|
||||||
type TextEncodings =
|
type TextEncodings =
|
||||||
| "ascii"
|
| "ascii"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { write, writeSync } from "node:fs";
|
import { write, writeSync } from "node:fs";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
|
|
||||||
const decoder = new TextDecoder("utf-8");
|
const decoder = new TextDecoder("utf-8");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
|
|
||||||
/** Asserts that an error thrown in a callback will not be wrongly caught. */
|
/** Asserts that an error thrown in a callback will not be wrongly caught. */
|
||||||
export async function assertCallbackErrorUncaught(
|
export async function assertCallbackErrorUncaught(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { stripColor } from "@test_util/std/fmt/colors.ts";
|
import { stripColor } from "@std/fmt/colors.ts";
|
||||||
import { assert, assertStrictEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertStrictEquals } from "@std/assert/mod.ts";
|
||||||
import { AssertionError } from "node:assert";
|
import { AssertionError } from "node:assert";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test(async function foo() {
|
Deno.test(async function foo() {
|
||||||
const asyncLocalStorage = new AsyncLocalStorage();
|
const asyncLocalStorage = new AsyncLocalStorage();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "[node/buffer] alloc fails if size is not a number",
|
name: "[node/buffer] alloc fails if size is not a number",
|
||||||
|
|
|
@ -9,8 +9,8 @@ import {
|
||||||
assertNotStrictEquals,
|
assertNotStrictEquals,
|
||||||
assertStrictEquals,
|
assertStrictEquals,
|
||||||
assertStringIncludes,
|
assertStringIncludes,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
|
|
||||||
const { spawn, spawnSync, execFile, execFileSync, ChildProcess } = CP;
|
const { spawn, spawnSync, execFile, execFileSync, ChildProcess } = CP;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import vm from "node:vm";
|
import vm from "node:vm";
|
||||||
import { stripColor } from "@test_util/std/fmt/colors.ts";
|
import { stripColor } from "@std/fmt/colors.ts";
|
||||||
import { assertStringIncludes } from "@test_util/std/assert/mod.ts";
|
import { assertStringIncludes } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test(function inspectCrossRealmObjects() {
|
Deno.test(function inspectCrossRealmObjects() {
|
||||||
assertStringIncludes(
|
assertStringIncludes(
|
||||||
|
|
|
@ -4,7 +4,7 @@ import crypto from "node:crypto";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import testVectors128 from "./gcmEncryptExtIV128.json" assert { type: "json" };
|
import testVectors128 from "./gcmEncryptExtIV128.json" assert { type: "json" };
|
||||||
import testVectors256 from "./gcmEncryptExtIV256.json" assert { type: "json" };
|
import testVectors256 from "./gcmEncryptExtIV256.json" assert { type: "json" };
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const aesGcm = (bits: string, key: Uint8Array) => {
|
const aesGcm = (bits: string, key: Uint8Array) => {
|
||||||
const ALGO = bits == "128" ? `aes-128-gcm` : `aes-256-gcm`;
|
const ALGO = bits == "128" ? `aes-128-gcm` : `aes-256-gcm`;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import crypto from "node:crypto";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { Readable } from "node:stream";
|
import { Readable } from "node:stream";
|
||||||
import { buffer, text } from "node:stream/consumers";
|
import { buffer, text } from "node:stream/consumers";
|
||||||
import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const rsaPrivateKey = Deno.readTextFileSync(
|
const rsaPrivateKey = Deno.readTextFileSync(
|
||||||
new URL("../testdata/rsa_private.pem", import.meta.url),
|
new URL("../testdata/rsa_private.pem", import.meta.url),
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
} from "node:crypto";
|
} from "node:crypto";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { Readable } from "node:stream";
|
import { Readable } from "node:stream";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
// https://github.com/denoland/deno/issues/18140
|
// https://github.com/denoland/deno/issues/18140
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
} from "node:crypto";
|
} from "node:crypto";
|
||||||
import { promisify } from "node:util";
|
import { promisify } from "node:util";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
import { createHmac } from "node:crypto";
|
import { createHmac } from "node:crypto";
|
||||||
|
|
||||||
const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1";
|
const RUN_SLOW_TESTS = Deno.env.get("SLOW_TESTS") === "1";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/testing/asserts.ts";
|
||||||
import { createSign, createVerify, sign, verify } from "node:crypto";
|
import { createSign, createVerify, sign, verify } from "node:crypto";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
import { execCode } from "../unit/test_util.ts";
|
import { execCode } from "../unit/test_util.ts";
|
||||||
import { createSocket } from "node:dgram";
|
import { createSocket } from "node:dgram";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import {
|
import { assert, assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
assert,
|
|
||||||
assertEquals,
|
|
||||||
assertThrows,
|
|
||||||
} from "@test_util/std/assert/mod.ts";
|
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import * as http2 from "node:http2";
|
import * as http2 from "node:http2";
|
||||||
import * as net from "node:net";
|
import * as net from "node:net";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
for (const url of ["http://127.0.0.1:4246", "https://127.0.0.1:4247"]) {
|
for (const url of ["http://127.0.0.1:4246", "https://127.0.0.1:4247"]) {
|
||||||
Deno.test(`[node/http2 client] ${url}`, {
|
Deno.test(`[node/http2 client] ${url}`, {
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
import EventEmitter from "node:events";
|
import EventEmitter from "node:events";
|
||||||
import http, { type RequestOptions } from "node:http";
|
import http, { type RequestOptions } from "node:http";
|
||||||
import https from "node:https";
|
import https from "node:https";
|
||||||
import { assert, assertEquals, fail } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals, fail } from "@std/assert/mod.ts";
|
||||||
import { assertSpyCalls, spy } from "@test_util/std/testing/mock.ts";
|
import { assertSpyCalls, spy } from "@std/testing/mock.ts";
|
||||||
|
|
||||||
import { gzip } from "node:zlib";
|
import { gzip } from "node:zlib";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { serve } from "@test_util/std/http/server.ts";
|
import { serve } from "@std/http/server.ts";
|
||||||
import { execCode } from "../unit/test_util.ts";
|
import { execCode } from "../unit/test_util.ts";
|
||||||
|
|
||||||
Deno.test("[node/http listen]", async () => {
|
Deno.test("[node/http listen]", async () => {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertRejects,
|
assertRejects,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
import { assertCallbackErrorUncaught } from "../_test_utils.ts";
|
||||||
import { pseudoRandomBytes, randomBytes } from "node:crypto";
|
import { pseudoRandomBytes, randomBytes } from "node:crypto";
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertNotEquals,
|
assertNotEquals,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const validateNonZero = (buf: Buffer) => {
|
const validateNonZero = (buf: Buffer) => {
|
||||||
if (!buf.some((ch) => ch > 0)) throw new Error("Error");
|
if (!buf.some((ch) => ch > 0)) throw new Error("Error");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { randomInt } from "node:crypto";
|
import { randomInt } from "node:crypto";
|
||||||
import { assert, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assert, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
const between = (x: number, min: number, max: number) => x >= min && x < max;
|
const between = (x: number, min: number, max: number) => x >= min && x < max;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { pbkdf2, pbkdf2Sync } from "node:crypto";
|
import { pbkdf2, pbkdf2Sync } from "node:crypto";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
type Algorithms =
|
type Algorithms =
|
||||||
| "md5"
|
| "md5"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { scrypt, scryptSync } from "node:crypto";
|
import { scrypt, scryptSync } from "node:crypto";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test("scrypt works correctly", async () => {
|
Deno.test("scrypt works correctly", async () => {
|
||||||
const { promise, resolve } = Promise.withResolvers<boolean>();
|
const { promise, resolve } = Promise.withResolvers<boolean>();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { createRequire, Module } from "node:module";
|
import { createRequire, Module } from "node:module";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import * as net from "node:net";
|
import * as net from "node:net";
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
import * as http from "node:http";
|
import * as http from "node:http";
|
||||||
|
|
||||||
Deno.test("[node/net] close event emits after error event", async () => {
|
Deno.test("[node/net] close event emits after error event", async () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertNotEquals,
|
assertNotEquals,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "build architecture is a string",
|
name: "build architecture is a string",
|
||||||
|
|
|
@ -4,7 +4,7 @@ import path from "node:path";
|
||||||
import posix from "node:path/posix";
|
import posix from "node:path/posix";
|
||||||
import win32 from "node:path/win32";
|
import win32 from "node:path/win32";
|
||||||
|
|
||||||
import { assertStrictEquals } from "@test_util/std/assert/mod.ts";
|
import { assertStrictEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test("[node/path] posix and win32 objects", () => {
|
Deno.test("[node/path] posix and win32 objects", () => {
|
||||||
assertStrictEquals(path.posix, posix);
|
assertStrictEquals(path.posix, posix);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import * as perfHooks from "node:perf_hooks";
|
import * as perfHooks from "node:perf_hooks";
|
||||||
import { performance } from "node:perf_hooks";
|
import { performance } from "node:perf_hooks";
|
||||||
import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "[perf_hooks] performance",
|
name: "[perf_hooks] performance",
|
||||||
|
|
|
@ -11,10 +11,10 @@ import {
|
||||||
assertObjectMatch,
|
assertObjectMatch,
|
||||||
assertStrictEquals,
|
assertStrictEquals,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { stripColor } from "@test_util/std/fmt/colors.ts";
|
import { stripColor } from "@std/fmt/colors.ts";
|
||||||
import * as path from "@test_util/std/path/mod.ts";
|
import * as path from "@std/path/mod.ts";
|
||||||
import { delay } from "@test_util/std/async/delay.ts";
|
import { delay } from "@std/async/delay.ts";
|
||||||
|
|
||||||
const testDir = new URL(".", import.meta.url);
|
const testDir = new URL(".", import.meta.url);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
import { parse, stringify } from "node:querystring";
|
import { parse, stringify } from "node:querystring";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { createInterface, Interface } from "node:readline";
|
import { createInterface, Interface } from "node:readline";
|
||||||
import { assertInstanceOf } from "@test_util/std/assert/mod.ts";
|
import { assertInstanceOf } from "@std/assert/mod.ts";
|
||||||
import { Readable, Writable } from "node:stream";
|
import { Readable, Writable } from "node:stream";
|
||||||
|
|
||||||
Deno.test("[node/readline] createInstance", () => {
|
Deno.test("[node/readline] createInstance", () => {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import repl from "node:repl";
|
import repl from "node:repl";
|
||||||
import { assert } from "@test_util/std/assert/mod.ts";
|
import { assert } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "repl module exports",
|
name: "repl module exports",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { assert } from "@test_util/std/assert/mod.ts";
|
import { assert } from "@std/assert/mod.ts";
|
||||||
import { fromFileUrl, relative } from "@test_util/std/path/mod.ts";
|
import { fromFileUrl, relative } from "@std/path/mod.ts";
|
||||||
import { pipeline } from "node:stream/promises";
|
import { pipeline } from "node:stream/promises";
|
||||||
import { createReadStream, createWriteStream } from "node:fs";
|
import { createReadStream, createWriteStream } from "node:fs";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
import { StringDecoder } from "node:string_decoder";
|
import { StringDecoder } from "node:string_decoder";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// 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 "@std/assert/mod.ts";
|
||||||
import * as timers from "node:timers";
|
import * as timers from "node:timers";
|
||||||
import * as timersPromises from "node:timers/promises";
|
import * as timersPromises from "node:timers/promises";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { assertEquals, assertInstanceOf } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertInstanceOf } from "@std/assert/mod.ts";
|
||||||
import { delay } from "@test_util/std/async/delay.ts";
|
import { delay } from "@std/async/delay.ts";
|
||||||
import { fromFileUrl, join } from "@test_util/std/path/mod.ts";
|
import { fromFileUrl, join } from "@std/path/mod.ts";
|
||||||
import { serveTls } from "@test_util/std/http/server.ts";
|
import { serveTls } from "@std/http/server.ts";
|
||||||
import * as tls from "node:tls";
|
import * as tls from "node:tls";
|
||||||
import * as net from "node:net";
|
import * as net from "node:net";
|
||||||
import * as stream from "node:stream";
|
import * as stream from "node:stream";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
// deno-lint-ignore-file no-explicit-any
|
// deno-lint-ignore-file no-explicit-any
|
||||||
|
|
||||||
import { assert } from "@test_util/std/assert/mod.ts";
|
import { assert } from "@std/assert/mod.ts";
|
||||||
import { isatty } from "node:tty";
|
import { isatty } from "node:tty";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertStrictEquals,
|
assertStrictEquals,
|
||||||
assertThrows,
|
assertThrows,
|
||||||
} from "@test_util/std/assert/mod.ts";
|
} from "@std/assert/mod.ts";
|
||||||
import { stripColor } from "@test_util/std/fmt/colors.ts";
|
import { stripColor } from "@std/fmt/colors.ts";
|
||||||
import * as util from "node:util";
|
import * as util from "node:util";
|
||||||
import { Buffer } from "node:buffer";
|
import { Buffer } from "node:buffer";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
getHeapStatistics,
|
getHeapStatistics,
|
||||||
setFlagsFromString,
|
setFlagsFromString,
|
||||||
} from "node:v8";
|
} from "node:v8";
|
||||||
import { assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assertEquals } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
// https://github.com/nodejs/node/blob/a2bbe5ff216bc28f8dac1c36a8750025a93c3827/test/parallel/test-v8-version-tag.js#L6
|
// https://github.com/nodejs/node/blob/a2bbe5ff216bc28f8dac1c36a8750025a93c3827/test/parallel/test-v8-version-tag.js#L6
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
import { isContext, runInNewContext } from "node:vm";
|
import { isContext, runInNewContext } from "node:vm";
|
||||||
import { assertEquals, assertThrows } from "@test_util/std/assert/mod.ts";
|
import { assertEquals, assertThrows } from "@std/assert/mod.ts";
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "vm runInNewContext",
|
name: "vm runInNewContext",
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import {
|
import { assert, assertEquals, assertObjectMatch } from "@std/assert/mod.ts";
|
||||||
assert,
|
import { fromFileUrl, relative } from "@std/path/mod.ts";
|
||||||
assertEquals,
|
|
||||||
assertObjectMatch,
|
|
||||||
} 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 * as workerThreads from "node:worker_threads";
|
||||||
import { EventEmitter, once } from "node:events";
|
import { EventEmitter, once } from "node:events";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
import { assert, assertEquals } from "@test_util/std/assert/mod.ts";
|
import { assert, assertEquals } from "@std/assert/mod.ts";
|
||||||
import { fromFileUrl, relative } from "@test_util/std/path/mod.ts";
|
import { fromFileUrl, relative } from "@std/path/mod.ts";
|
||||||
import {
|
import {
|
||||||
brotliCompress,
|
brotliCompress,
|
||||||
brotliCompressSync,
|
brotliCompressSync,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"@test_util/": "../../test_util/"
|
"@test_util/": "../../test_util/",
|
||||||
|
"@std/": "../../test_util/std/"
|
||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"setup": "deno run --allow-read --allow-write ./setup.ts",
|
"setup": "deno run --allow-read --allow-write ./setup.ts",
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
|
|
||||||
/** This copies the test files according to the config file `tests/node_compat/config.jsonc` */
|
/** This copies the test files according to the config file `tests/node_compat/config.jsonc` */
|
||||||
|
|
||||||
import { walk } from "@test_util/std/fs/walk.ts";
|
import { walk } from "@std/fs/walk.ts";
|
||||||
import { sep } from "@test_util/std/path/mod.ts";
|
import { sep } from "@std/path/mod.ts";
|
||||||
import { ensureFile } from "@test_util/std/fs/ensure_file.ts";
|
import { ensureFile } from "@std/fs/ensure_file.ts";
|
||||||
import { writeAll } from "@test_util/std/streams/write_all.ts";
|
import { writeAll } from "@std/streams/write_all.ts";
|
||||||
import { withoutAll } from "@test_util/std/collections/without_all.ts";
|
import { withoutAll } from "@std/collections/without_all.ts";
|
||||||
import { relative } from "@test_util/std/path/posix.ts";
|
import { relative } from "@std/path/posix.ts";
|
||||||
|
|
||||||
import { config, ignoreList } from "../../tests/node_compat/common.ts";
|
import { config, ignoreList } from "../../tests/node_compat/common.ts";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue