From 64ebd441e9f1b929c936aab1445afec10b8b7417 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Wed, 7 Feb 2024 16:21:32 -0700 Subject: chore: use @test_util for node_compat tests (#22331) --- cli/tests/node_compat/common.ts | 6 +++--- cli/tests/node_compat/deno.json | 5 +++++ cli/tests/node_compat/runner.ts | 2 +- cli/tests/node_compat/test.ts | 8 ++++---- 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 cli/tests/node_compat/deno.json (limited to 'cli/tests/node_compat') diff --git a/cli/tests/node_compat/common.ts b/cli/tests/node_compat/common.ts index b3663ec3c..e079c6aaf 100644 --- a/cli/tests/node_compat/common.ts +++ b/cli/tests/node_compat/common.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { partition } from "../../../test_util/std/collections/partition.ts"; -import { join } from "../../../test_util/std/path/mod.ts"; -import * as JSONC from "../../../test_util/std/jsonc/mod.ts"; +import { partition } from "@test_util/std/collections/partition.ts"; +import { join } from "@test_util/std/path/mod.ts"; +import * as JSONC from "@test_util/std/jsonc/mod.ts"; /** * The test suite matches the folders inside the `test` folder inside the * node repo diff --git a/cli/tests/node_compat/deno.json b/cli/tests/node_compat/deno.json new file mode 100644 index 000000000..fe518960f --- /dev/null +++ b/cli/tests/node_compat/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "@test_util/": "../../../test_util/" + } +} diff --git a/cli/tests/node_compat/runner.ts b/cli/tests/node_compat/runner.ts index 11ccefa82..4695037cc 100644 --- a/cli/tests/node_compat/runner.ts +++ b/cli/tests/node_compat/runner.ts @@ -1,7 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import "./polyfill_globals.js"; import { createRequire } from "node:module"; -import { toFileUrl } from "../../../test_util/std/path/mod.ts"; +import { toFileUrl } from "@test_util/std/path/mod.ts"; const file = Deno.args[0]; if (!file) { throw new Error("No file provided"); diff --git a/cli/tests/node_compat/test.ts b/cli/tests/node_compat/test.ts index a57fd11a5..13ff429b5 100644 --- a/cli/tests/node_compat/test.ts +++ b/cli/tests/node_compat/test.ts @@ -13,10 +13,10 @@ * all share the same working directory. */ -import { magenta } from "../../../test_util/std/fmt/colors.ts"; -import { pooledMap } from "../../../test_util/std/async/pool.ts"; -import { dirname, fromFileUrl, join } from "../../../test_util/std/path/mod.ts"; -import { fail } from "../../../test_util/std/assert/mod.ts"; +import { magenta } from "@test_util/std/fmt/colors.ts"; +import { pooledMap } from "@test_util/std/async/pool.ts"; +import { dirname, fromFileUrl, join } from "@test_util/std/path/mod.ts"; +import { fail } from "@test_util/std/assert/mod.ts"; import { config, getPathsFromTestSuites, -- cgit v1.2.3