From d3742c884a227658db4e79c53a1f8ee915f04db6 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Tue, 21 Apr 2026 23:48:48 -0700 Subject: [PATCH] test(team-mode): give setup -q / setup --local tests a 3-minute budget ./setup runs a full install, Bun binary build, and skill regeneration. On a cold cache it takes 60-90s, comfortably above bun test's 5s default. Both "setup -q produces no stdout" and "setup --local prints deprecation warning" have been flaky-to-failing for a while with [5001.78ms] timeouts. The test logic was fine, the budget wasn't. Bumped both to 180s via the third-arg timeout. Co-Authored-By: Claude Opus 4.7 (1M context) --- test/team-mode.test.ts | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/test/team-mode.test.ts b/test/team-mode.test.ts index 0a856950..ce8c1d61 100644 --- a/test/team-mode.test.ts +++ b/test/team-mode.test.ts @@ -323,17 +323,28 @@ describe('gstack-team-init', () => { }); describe('setup --team / --no-team / -q', () => { - test('setup -q produces no stdout', () => { - const result = run(`${path.join(ROOT, 'setup')} -q`, { cwd: ROOT }); - // -q should suppress informational output (may still have some output from build) - // The key test is that the "Skill naming:" prompt and "gstack ready" messages are suppressed - expect(result.stdout).not.toContain('Skill naming:'); - expect(result.stdout).not.toContain('gstack ready'); - }); + // `./setup` does a full install + build + skill regeneration. On a cold cache + // it routinely takes 60-90s. Give both tests a 3-minute budget so CI doesn't + // report pre-existing timeouts as failures. + test( + 'setup -q produces no stdout', + () => { + const result = run(`${path.join(ROOT, 'setup')} -q`, { cwd: ROOT }); + // -q should suppress informational output (may still have some output from build) + // The key test is that the "Skill naming:" prompt and "gstack ready" messages are suppressed + expect(result.stdout).not.toContain('Skill naming:'); + expect(result.stdout).not.toContain('gstack ready'); + }, + 180_000, + ); - test('setup --local prints deprecation warning', () => { - // stderr capture: run via bash redirect so we can capture stderr - const result = run(`bash -c '${path.join(ROOT, 'setup')} --local -q 2>&1'`, { cwd: ROOT }); - expect(result.stdout).toContain('deprecated'); - }); + test( + 'setup --local prints deprecation warning', + () => { + // stderr capture: run via bash redirect so we can capture stderr + const result = run(`bash -c '${path.join(ROOT, 'setup')} --local -q 2>&1'`, { cwd: ROOT }); + expect(result.stdout).toContain('deprecated'); + }, + 180_000, + ); });