From cdaa729a08b404e57faa8bb55bba3eb715be1913 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Tue, 5 Mar 2024 17:56:31 +0530 Subject: [PATCH] refactor: move test_util.ts --- tests/unit/chmod_test.ts | 2 +- tests/unit/command_test.ts | 2 +- tests/unit/read_file_test.ts | 2 +- tests/unit/serve_test.ts | 2 +- tests/unit/symlink_test.ts | 2 +- tests/unit/tls_test.ts | 2 +- tests/unit/write_file_test.ts | 2 +- tests/{unit => util}/test_util.ts | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename tests/{unit => util}/test_util.ts (100%) diff --git a/tests/unit/chmod_test.ts b/tests/unit/chmod_test.ts index df3771bbc1631d..5e22d6b60a7eaf 100644 --- a/tests/unit/chmod_test.ts +++ b/tests/unit/chmod_test.ts @@ -4,7 +4,7 @@ import { assertEquals, assertRejects, assertThrows, -} from "./test_util.ts"; +} from "../util/test_util.ts"; Deno.test( { diff --git a/tests/unit/command_test.ts b/tests/unit/command_test.ts index cbb1c4921c9278..ac540ef26cb97c 100644 --- a/tests/unit/command_test.ts +++ b/tests/unit/command_test.ts @@ -6,7 +6,7 @@ import { assertRejects, assertStringIncludes, assertThrows, -} from "./test_util.ts"; +} from "../util/test_util.ts"; Deno.test( { permissions: { write: true, run: true, read: true } }, diff --git a/tests/unit/read_file_test.ts b/tests/unit/read_file_test.ts index bfb3b508512887..8b34cc58f09645 100644 --- a/tests/unit/read_file_test.ts +++ b/tests/unit/read_file_test.ts @@ -6,7 +6,7 @@ import { assertThrows, pathToAbsoluteFileUrl, unreachable, -} from "./test_util.ts"; +} from "../util/test_util.ts"; Deno.test({ permissions: { read: true } }, function readFileSyncSuccess() { const data = Deno.readFileSync("tests/testdata/assets/fixture.json"); diff --git a/tests/unit/serve_test.ts b/tests/unit/serve_test.ts index 635f164e49dfc2..f1d9be7c5766b5 100644 --- a/tests/unit/serve_test.ts +++ b/tests/unit/serve_test.ts @@ -11,7 +11,7 @@ import { execCode, fail, tmpUnixSocketPath, -} from "./test_util.ts"; +} from "../util/test_util.ts"; // Since these tests may run in parallel, ensure this port is unique to this file const servePort = 4502; diff --git a/tests/unit/symlink_test.ts b/tests/unit/symlink_test.ts index 310c3693055d73..f8498747603ee0 100644 --- a/tests/unit/symlink_test.ts +++ b/tests/unit/symlink_test.ts @@ -4,7 +4,7 @@ import { assertRejects, assertThrows, pathToAbsoluteFileUrl, -} from "./test_util.ts"; +} from "../util/test_util.ts"; Deno.test( { permissions: { read: true, write: true } }, diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts index 1ac5e8d9832c59..ea4e8c43f27eb6 100644 --- a/tests/unit/tls_test.ts +++ b/tests/unit/tls_test.ts @@ -6,7 +6,7 @@ import { assertRejects, assertStrictEquals, assertThrows, -} from "./test_util.ts"; +} from "../util/test_util.ts"; import { BufReader, BufWriter } from "@std/io/mod.ts"; import { readAll } from "@std/streams/read_all.ts"; import { writeAll } from "@std/streams/write_all.ts"; diff --git a/tests/unit/write_file_test.ts b/tests/unit/write_file_test.ts index 6cd08e2d14db98..1ba526ca62a1b1 100644 --- a/tests/unit/write_file_test.ts +++ b/tests/unit/write_file_test.ts @@ -5,7 +5,7 @@ import { assertRejects, assertThrows, unreachable, -} from "./test_util.ts"; +} from "../util/test_util.ts"; Deno.test( { permissions: { read: true, write: true } }, diff --git a/tests/unit/test_util.ts b/tests/util/test_util.ts similarity index 100% rename from tests/unit/test_util.ts rename to tests/util/test_util.ts