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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-26 16:12:57 +00:00
1 parent fe464262aa
commit f07c2ea1e5
1 file changed
+1 -1
+1 -1
View File
@@ -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`);