summaryrefslogtreecommitdiff
path: root/std/fs/move_test.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-09-08 17:43:43 +0800
committerGitHub <noreply@github.com>2020-09-08 11:43:43 +0200
commitc5d50737f05f6b1999d1973ba5bd260473aadcbd (patch)
treef26e7c101a199f3a4df5f9f119ce68011a5bf370 /std/fs/move_test.ts
parent334ed0e2f42f146b68aa996d26b1fe34f751fe3e (diff)
test(std/fs): make tests runnable from any directory (#7388)
Diffstat (limited to 'std/fs/move_test.ts')
-rw-r--r--std/fs/move_test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/fs/move_test.ts b/std/fs/move_test.ts
index 73a96ce46..7bc7e8fee 100644
--- a/std/fs/move_test.ts
+++ b/std/fs/move_test.ts
@@ -10,7 +10,8 @@ import { ensureFile, ensureFileSync } from "./ensure_file.ts";
import { ensureDir, ensureDirSync } from "./ensure_dir.ts";
import { exists, existsSync } from "./exists.ts";
-const testdataDir = path.resolve("fs", "testdata");
+const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
+const testdataDir = path.resolve(moduleDir, "testdata");
Deno.test("moveDirectoryIfSrcNotExists", async function (): Promise<void> {
const srcDir = path.join(testdataDir, "move_test_src_1");