Files
VolcanicCore/frontend/e2e/fixtures.ts

14 lines
555 B
TypeScript

import { spawnSync } from "node:child_process";
import path from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default async function globalSetup() {
const dataDir = path.resolve(__dirname, "../.pw-data");
// Shell out to `rm -rf` — Node's fs.rm can trip ENOTEMPTY on overlay
// filesystems (rootless containers, docker layered volumes) where the
// dir looks empty via readdir but rmdir still refuses.
spawnSync("rm", ["-rf", dataDir], { stdio: "ignore" });
}