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 statePath = path.join(tmpDir, '.planning', 'STATE.md');
fs.writeFileSync(statePath, makeStateMd(headerLine, separatorLine, existingRows));
let stdout = '';
try {
stdout = execFileSync('bash', ['-c', bashBlock], {
cwd: tmpDir,
env: { ...process.env, TASK: TASK_DESC },
encoding: 'utf8',
});
} finally {
// cleanup deferred to caller via t.after where bound
}
// Cleanup is bound by each caller via t.after(tmpDir).
const stdout = execFileSync('bash', ['-c', bashBlock], {
cwd: tmpDir,
env: { ...process.env, TASK: TASK_DESC },
encoding: 'utf8',
});
const after = fs.readFileSync(statePath, 'utf8');
return { tmpDir, stdout, after };
}