MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / tempDir

Function tempDir

apps/desktop/src/main/settings-permissions.test.ts:48–52  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

46/** A temp dir removed when the test ends. `try/finally` would do the same, but the repo's
47 * no-try-catch-or-throw rule rejects the construct and a registered hook reads better. */
48const tempDir = (prefix: string) => {
49 const dir = mkdtempSync(join(tmpdir(), prefix));
50 onTestFinished(() => rmSync(dir, { recursive: true, force: true }));
51 return dir;
52};
53
54describe("electron-store configFileMode", () => {
55 it("creates the settings file owner-only", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected