test: integration tests for gstack-review-log and gstack-review-read

- Full temp-dir integration tests via GSTACK_HOME env var override
- Tests: file creation, append behavior, slash sanitization, NO_REVIEWS
  fallback, review content read, CONFIG separator
- Regression tests: generated SKILL.md files use new helpers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-17 20:56:36 -07:00
parent 77929c3dd5
commit c940cb5fb3
2 changed files with 142 additions and 2 deletions
+16 -2
View File
@@ -329,14 +329,14 @@ describe('REVIEW_DASHBOARD resolver', () => {
for (const skill of REVIEW_SKILLS) {
test(`review dashboard appears in ${skill} generated file`, () => {
const content = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8');
expect(content).toContain('reviews.jsonl');
expect(content).toContain('gstack-review-read');
expect(content).toContain('REVIEW READINESS DASHBOARD');
});
}
test('review dashboard appears in ship generated file', () => {
const content = fs.readFileSync(path.join(ROOT, 'ship', 'SKILL.md'), 'utf-8');
expect(content).toContain('reviews.jsonl');
expect(content).toContain('gstack-review-read');
expect(content).toContain('REVIEW READINESS DASHBOARD');
});
@@ -349,4 +349,18 @@ describe('REVIEW_DASHBOARD resolver', () => {
expect(content).toContain('Design Review');
expect(content).toContain('skip_eng_review');
});
test('review dashboard uses gstack-review-read (not multi-line eval+cat pattern)', () => {
for (const skill of [...REVIEW_SKILLS, 'ship']) {
const content = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8');
expect(content).toContain('gstack-review-read');
}
});
test('review log uses gstack-review-log (not multi-line eval+mkdir+echo pattern)', () => {
for (const skill of REVIEW_SKILLS) {
const content = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8');
expect(content).toContain('gstack-review-log');
}
});
});