MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / withTempDir

Function withTempDir

tests/job-config.test.ts:13–20  ·  view source on GitHub ↗
(run: (dir: string) => Promise<void> | void)

Source from the content-addressed store, hash-verified

11} from "../src/job-config.js";
12
13async function withTempDir(run: (dir: string) => Promise<void> | void): Promise<void> {
14 const dir = fs.mkdtempSync(path.join(os.tmpdir(), "skillpack-job-config-"));
15 try {
16 await run(dir);
17 } finally {
18 fs.rmSync(dir, { recursive: true, force: true });
19 }
20}
21
22test("loadJobFile returns an empty list when job.json is missing", async () => {
23 await withTempDir((dir) => {

Callers 1

job-config.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected