test / helpers.ts
import { promises as fs } from "fs";
import * as os from "os";
import * as path from "path";
/** Create a temp directory and return its realpath (macOS tmpdir is a symlink). */
export async function makeRoot(): Promise<string> {
return fs.realpath(await fs.mkdtemp(path.join(os.tmpdir(), "rw-plugin-")));
}
test / helpers.ts
import { promises as fs } from "fs";
import * as os from "os";
import * as path from "path";
/** Create a temp directory and return its realpath (macOS tmpdir is a symlink). */
export async function makeRoot(): Promise<string> {
return fs.realpath(await fs.mkdtemp(path.join(os.tmpdir(), "rw-plugin-")));
}