fix(tests): derive STATE.md phase number from phaseDir in setupProject fixture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-26 11:46:57 -04:00
parent c85e65ec03
commit 274fc524cd

View File

@@ -33,6 +33,8 @@ async function setupProject(opts: {
const phasesDir = join(planningDir, 'phases');
const phaseFullDir = join(phasesDir, opts.phaseDir);
const phaseNum = parseInt(opts.phaseDir, 10) || 1;
await mkdir(phaseFullDir, { recursive: true });
await writeFile(join(planningDir, 'ROADMAP.md'), opts.roadmap, 'utf-8');
await writeFile(
@@ -46,7 +48,7 @@ async function setupProject(opts: {
'',
'# Project State',
'',
'Phase: 7 of 2 — EXECUTING',
`Phase: ${phaseNum} of 2 — EXECUTING`,
].join('\n'),
'utf-8',
);