mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
test(std/fs): make tests runnable from any directory (#7388)
This commit is contained in:
parent
334ed0e2f4
commit
c5d50737f0
9 changed files with 18 additions and 9 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue