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

Function withTempDir

tests/zip.test.ts:11–18  ·  view source on GitHub ↗
(run: (dir: string) => Promise<void> | void)

Source from the content-addressed store, hash-verified

9import { zipCommand } from "../src/commands/zip.js";
10
11async function withTempDir(run: (dir: string) => Promise<void> | void): Promise<void> {
12 const dir = fs.mkdtempSync(path.join(os.tmpdir(), "skillpack-zip-"));
13 try {
14 await run(dir);
15 } finally {
16 fs.rmSync(dir, { recursive: true, force: true });
17 }
18}
19
20function createPack(dir: string): void {
21 saveConfig(dir, {

Callers 1

zip.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected