From dd50d70f94ef70c43fabbb51ccd7fc5166defe64 Mon Sep 17 00:00:00 2001 From: Observable User Date: Fri, 1 Nov 2024 21:59:36 -0700 Subject: [PATCH] adopting rimraf in lieu of node fs rm for what i hope is better windows compatibility --- test/mocks/directory.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/mocks/directory.ts b/test/mocks/directory.ts index a1e731f07..f90750e88 100644 --- a/test/mocks/directory.ts +++ b/test/mocks/directory.ts @@ -3,6 +3,7 @@ import {mkdtemp, rm} from "fs/promises"; import {tmpdir} from "os"; import {join} from "path/posix"; import {promisify} from "util"; +import {rimraf} from "rimraf"; export function mockIsolatedDirectory({git}: {git: boolean}) { let dir: string; @@ -24,6 +25,7 @@ export function mockIsolatedDirectory({git}: {git: boolean}) { afterEach(async () => { process.chdir(cwd); - await rm(dir, {recursive: true, force: true}); + await rimraf(dir); + // await rm(dir, {recursive: true, force: true}); }); }