test: update claude-md tests for \$INSTRUCTION_FILE codex fix

Commit 512a80b changed new-project.md to use \$INSTRUCTION_FILE
(AGENTS.md for Codex, CLAUDE.md for all other runtimes) instead of
hardcoding CLAUDE.md. Two test assertions still checked for the
hardcoded string and failed on CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-03 11:26:24 -04:00
parent 00e0446b99
commit 9af67156da

View File

@@ -65,18 +65,20 @@ describe('new-project workflow includes CLAUDE.md generation', () => {
const workflowPath = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'new-project.md');
const commandsPath = path.join(__dirname, '..', 'docs', 'COMMANDS.md');
test('new-project workflow generates CLAUDE.md before final commit', () => {
test('new-project workflow generates instruction file before final commit', () => {
const content = fs.readFileSync(workflowPath, 'utf-8');
assert.ok(content.includes('generate-claude-md'));
assert.ok(content.includes('--files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md CLAUDE.md'));
// Codex fix: workflow now uses $INSTRUCTION_FILE (AGENTS.md for Codex, CLAUDE.md otherwise)
assert.ok(content.includes('--files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md "$INSTRUCTION_FILE"'));
});
test('new-project artifacts mention CLAUDE.md', () => {
test('new-project artifacts reference instruction file variable', () => {
const workflowContent = fs.readFileSync(workflowPath, 'utf-8');
const commandsContent = fs.readFileSync(commandsPath, 'utf-8');
assert.ok(workflowContent.includes('| Project guide | `CLAUDE.md`'));
assert.ok(workflowContent.includes('- `CLAUDE.md`'));
// Codex fix: hardcoded CLAUDE.md replaced with $INSTRUCTION_FILE variable
assert.ok(workflowContent.includes('| Project guide | `$INSTRUCTION_FILE`'));
assert.ok(workflowContent.includes('- `$INSTRUCTION_FILE`'));
assert.ok(commandsContent.includes('`CLAUDE.md`'));
});
});