From f07c2ea1e5afdecb22e86f000ad389bbab55df73 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 26 Oct 2026 16:12:57 +0000 Subject: [PATCH] Restore the exact stderr line count in the POLICY_SOURCE_UNAVAILABLE test RH-15: toBeGreaterThan(0) after a toMatch is vacuous; the refusal is one deterministic line, so toBe(1) holds and is restored. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/ship-queue-train.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ship-queue-train.test.ts b/test/ship-queue-train.test.ts index be533b712..318a25657 100644 --- a/test/ship-queue-train.test.ts +++ b/test/ship-queue-train.test.ts @@ -230,7 +230,7 @@ describe('ready under a train policy: the screen choice', () => { repo.git('remote', 'set-url', 'origin', originUrl); expect(unlisted.status).toBe(EXIT.refused); expect(unlisted.err).toMatch(/git fetch origin main failed: .*\(POLICY_SOURCE_UNAVAILABLE\)/); - expect(unlisted.err.split('\n').filter(Boolean).length).toBeGreaterThan(0); + expect(unlisted.err.split('\n').filter(Boolean).length).toBe(1); expect(dispatches(fx)).toEqual([]); expect(fs.existsSync(path.join(fx.state, 'ship-queue', 'ready'))).toBe(false); repo.git('push', '-q', '-f', 'origin', `${mergeRefCommit(fx, moved)}:refs/pull/1/merge`);