diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-09-08 17:43:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 11:43:43 +0200 |
commit | c5d50737f05f6b1999d1973ba5bd260473aadcbd (patch) | |
tree | f26e7c101a199f3a4df5f9f119ce68011a5bf370 /std/fs/_util_test.ts | |
parent | 334ed0e2f42f146b68aa996d26b1fe34f751fe3e (diff) |
test(std/fs): make tests runnable from any directory (#7388)
Diffstat (limited to 'std/fs/_util_test.ts')
-rw-r--r-- | std/fs/_util_test.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/fs/_util_test.ts b/std/fs/_util_test.ts index a05f2cb2d..b5fdfe40b 100644 --- a/std/fs/_util_test.ts +++ b/std/fs/_util_test.ts @@ -6,7 +6,8 @@ import { isSubdir, getFileInfoType, PathType } from "./_util.ts"; import { ensureFileSync } from "./ensure_file.ts"; import { ensureDirSync } from "./ensure_dir.ts"; -const testdataDir = path.resolve("fs", "testdata"); +const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); +const testdataDir = path.resolve(moduleDir, "testdata"); Deno.test("_isSubdir", function (): void { const pairs = [ |