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

Function withTempProject

scripts/test-dashboard.js:12–19  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

10const { classifyHookProblem, collectDashboard, percentile, readOperatorArtifacts, renderDashboard, relativeTime } = require('./dashboard');
11
12function withTempProject(run) {
13 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'citadel-dashboard-'));
14 try {
15 return run(dir);
16 } finally {
17 fs.rmSync(dir, { recursive: true, force: true });
18 }
19}
20
21function write(filePath, content) {
22 fs.mkdirSync(path.dirname(filePath), { recursive: true });

Callers 1

test-dashboard.jsFile · 0.70

Calls 1

runFunction · 0.70

Tested by

no test coverage detected