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

Function withTempProject

scripts/test-verification-plan.js:13–20  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

11const { render } = require('./verification-plan');
12
13function withTempProject(run) {
14 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-verification-plan-'));
15 try {
16 return run(dir);
17 } finally {
18 fs.rmSync(dir, { recursive: true, force: true });
19 }
20}
21
22assert.equal(profileForFiles(['hooks_src/protect-files.js'], { test: 'node test.js' }).id, 'hook-runtime');
23assert(profileForFiles(['hooks_src/protect-files.js'], { test: 'node test.js' }).commands.includes('node scripts/verify-hooks.js'));

Callers 1

Calls 1

runFunction · 0.70

Tested by

no test coverage detected