summaryrefslogtreecommitdiff
path: root/std/fs/ensure_dir_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs/ensure_dir_test.ts')
-rw-r--r--std/fs/ensure_dir_test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/fs/ensure_dir_test.ts b/std/fs/ensure_dir_test.ts
index c24e14d1a..29a7913b1 100644
--- a/std/fs/ensure_dir_test.ts
+++ b/std/fs/ensure_dir_test.ts
@@ -4,7 +4,8 @@ import * as path from "../path/mod.ts";
import { ensureDir, ensureDirSync } from "./ensure_dir.ts";
import { ensureFile, ensureFileSync } from "./ensure_file.ts";
-const testdataDir = path.resolve("fs", "testdata");
+const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
+const testdataDir = path.resolve(moduleDir, "testdata");
Deno.test("ensureDirIfItNotExist", async function (): Promise<void> {
const baseDir = path.join(testdataDir, "ensure_dir_not_exist");