From bf9590c863dde968b1bc7973548c10a3e206ad09 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 31 Oct 2026 21:07:10 +0000 Subject: [PATCH] test: review-collect whole-tree helper reads a null status as -1 (typecheck:test ratchet) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/review-collect.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/review-collect.test.ts b/test/review-collect.test.ts index 09fc52c51..1a64f4da8 100644 --- a/test/review-collect.test.ts +++ b/test/review-collect.test.ts @@ -190,7 +190,7 @@ describe('GST-544: the consumer scan reads only files that can match, under one const patterns = ['rows.json', 'my rows.json', 'rules.json', 'index.json', 'post.json', 'orphan.json', 'live.csv', 'b.csv']; const wholeTree = (dir: string, at: string) => { const r = spawnSync('git', ['-c', 'core.quotePath=false', 'grep', '-I', '-F', '-o', '--null', '--no-line-number', '--no-column', '--no-color', ...patterns.flatMap(b => ['-e', b]), ...(at ? [at, '--'] : ['--untracked', '--'])], { cwd: dir, encoding: 'utf8', timeout: 10_000 }); - expect([0, 1]).toContain(r.status); + expect([0, 1]).toContain(r.status ?? -1); return r.stdout.split('\n').filter(Boolean).sort(); }; // Value: protects=the narrowed scan prints exactly the lines one whole-tree git grep prints, at a commit, at the merge base