test(#2133): drop no-op try/finally in runAgainst helper (review)

This commit is contained in:
Tom Boucher
2026-07-12 11:13:48 -04:00
parent 30469ba751
commit cb48b2b48f

View File

@@ -93,16 +93,12 @@ describe('#2133 fast.md log_to_state schema gate', () => {
const tmpDir = createTempProject('fix-2133-'); const tmpDir = createTempProject('fix-2133-');
const statePath = path.join(tmpDir, '.planning', 'STATE.md'); const statePath = path.join(tmpDir, '.planning', 'STATE.md');
fs.writeFileSync(statePath, makeStateMd(headerLine, separatorLine, existingRows)); fs.writeFileSync(statePath, makeStateMd(headerLine, separatorLine, existingRows));
let stdout = ''; // Cleanup is bound by each caller via t.after(tmpDir).
try { const stdout = execFileSync('bash', ['-c', bashBlock], {
stdout = execFileSync('bash', ['-c', bashBlock], { cwd: tmpDir,
cwd: tmpDir, env: { ...process.env, TASK: TASK_DESC },
env: { ...process.env, TASK: TASK_DESC }, encoding: 'utf8',
encoding: 'utf8', });
});
} finally {
// cleanup deferred to caller via t.after where bound
}
const after = fs.readFileSync(statePath, 'utf8'); const after = fs.readFileSync(statePath, 'utf8');
return { tmpDir, stdout, after }; return { tmpDir, stdout, after };
} }