summaryrefslogtreecommitdiff
path: root/std/node/_fs/_fs_readFile_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/_fs/_fs_readFile_test.ts')
-rw-r--r--std/node/_fs/_fs_readFile_test.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/std/node/_fs/_fs_readFile_test.ts b/std/node/_fs/_fs_readFile_test.ts
index ff449dbb2..9ada80057 100644
--- a/std/node/_fs/_fs_readFile_test.ts
+++ b/std/node/_fs/_fs_readFile_test.ts
@@ -2,9 +2,8 @@ import { readFile, readFileSync } from "./_fs_readFile.ts";
import * as path from "../../path/mod.ts";
import { assertEquals, assert } from "../../testing/asserts.ts";
-const testData = path.resolve(
- path.join("node", "_fs", "testdata", "hello.txt"),
-);
+const moduleDir = path.dirname(path.fromFileUrl(import.meta.url));
+const testData = path.resolve(moduleDir, "testdata", "hello.txt");
Deno.test("readFileSuccess", async function () {
const data = await new Promise((res, rej) => {