Skip to content

Commit

Permalink
adopting rimraf in lieu of node fs rm for what i hope is better windo…
Browse files Browse the repository at this point in the history
…ws compatibility
  • Loading branch information
Observable User committed Nov 2, 2024
1 parent 41f9682 commit dd50d70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/mocks/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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});
});
}

0 comments on commit dd50d70

Please sign in to comment.