MCPcopy Create free account
hub / github.com/SethGammon/Citadel / withTempProject

Function withTempProject

scripts/test-campaign-core.js:16–23  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

14const { extractCompletionOutcome } = require('../core/campaigns/outcomes');
15
16function withTempProject(run) {
17 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-campaign-'));
18 try {
19 run(dir);
20 } finally {
21 fs.rmSync(dir, { recursive: true, force: true });
22 }
23}
24
25function makeCampaign(name, status = 'active') {
26 return [

Callers 1

Calls 1

runFunction · 0.70

Tested by

no test coverage detected