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) <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-04-21 23:48:48 -07:00
parent b6be59ab75
commit d3742c884a
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
1 changed files with 23 additions and 12 deletions

View File

@ -323,17 +323,28 @@ describe('gstack-team-init', () => {
}); });
describe('setup --team / --no-team / -q', () => { describe('setup --team / --no-team / -q', () => {
test('setup -q produces no stdout', () => { // `./setup` does a full install + build + skill regeneration. On a cold cache
const result = run(`${path.join(ROOT, 'setup')} -q`, { cwd: ROOT }); // it routinely takes 60-90s. Give both tests a 3-minute budget so CI doesn't
// -q should suppress informational output (may still have some output from build) // report pre-existing timeouts as failures.
// The key test is that the "Skill naming:" prompt and "gstack ready" messages are suppressed test(
expect(result.stdout).not.toContain('Skill naming:'); 'setup -q produces no stdout',
expect(result.stdout).not.toContain('gstack ready'); () => {
}); 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', () => { test(
// stderr capture: run via bash redirect so we can capture stderr 'setup --local prints deprecation warning',
const result = run(`bash -c '${path.join(ROOT, 'setup')} --local -q 2>&1'`, { cwd: ROOT }); () => {
expect(result.stdout).toContain('deprecated'); // 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,
);
}); });