mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
* test(cli): give each test file its own home so renders never wait on another file's lock * test(cli): pin the cli test config after adding the per-file home setup
11 lines
519 B
JavaScript
11 lines
519 B
JavaScript
// Each test file gets a home of its own: per-user state such as the render lock is never
|
|
// shared by test files running at the same time, so one file's render cannot make another's wait.
|
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
import { afterAll } from "vitest";
|
|
|
|
const home = mkdtempSync(join(tmpdir(), "hf-test-file-home-"));
|
|
process.env.HOME = process.env.USERPROFILE = home;
|
|
afterAll(() => rmSync(home, { recursive: true, force: true }));
|