summaryrefslogtreecommitdiff
path: root/std/fs/ensure_file_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs/ensure_file_test.ts')
-rw-r--r--std/fs/ensure_file_test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/fs/ensure_file_test.ts b/std/fs/ensure_file_test.ts
index d87de0051..ee21e7b88 100644
--- a/std/fs/ensure_file_test.ts
+++ b/std/fs/ensure_file_test.ts
@@ -3,7 +3,8 @@ import { assertThrows, assertThrowsAsync } from "../testing/asserts.ts";
import * as path from "../path/mod.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("ensureFileIfItNotExist", async function (): Promise<void> {
const testDir = path.join(testdataDir, "ensure_file_1");