From 7b0f2b7a80ab8e44066a5edffdce8e7185ec509e Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 30 Oct 2026 02:47:10 +0000 Subject: [PATCH] test(review-plan): assert the no-local-base setup actually removed main Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/review-plan-cli.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/review-plan-cli.test.ts b/test/review-plan-cli.test.ts index ed804d350..1cf6785fe 100644 --- a/test/review-plan-cli.test.ts +++ b/test/review-plan-cli.test.ts @@ -46,7 +46,9 @@ describe('gstack-review-plan', () => { test('no local base branch: scope comes from origin/ and the scope-gated specialists stay', () => { const r = repo({ 'src/a.ts': Array.from({ length: 80 }, (_, i) => `export const v${i} = ${i};`).join('\n') + '\n' }); const git = (...a: string[]) => spawnSync('git', a, { cwd: r.dir, encoding: 'utf8', timeout: 10_000 }); - git('update-ref', 'refs/remotes/origin/main', 'main'); git('branch', '-D', 'main'); + expect(git('update-ref', 'refs/remotes/origin/main', 'main').status).toBe(0); + expect(git('branch', '-D', 'main').status).toBe(0); + expect(git('rev-parse', '--verify', '-q', 'main').status).not.toBe(0); const out = run(r, []).stdout; expect(out).not.toContain('scope_error'); expect(out).toContain('DISPATCH: specialist performance');