test: file-level 30s timeout for the CLI menubar suite

Every case spawns the real CLI and does genuine multi-provider parse
work; run #3 showed a second sibling crossing the 5s default on the
shared runner. File-level cap replaces the earlier single-test one.
This commit is contained in:
ozymandiashh 2026-08-04 03:51:50 +03:00
parent fe8b576516
commit 8c758ddf5a

View file

@ -3,7 +3,12 @@ import { tmpdir } from 'node:os'
import { delimiter as pathDelimiter, join } from 'node:path'
import { spawnSync } from 'node:child_process'
import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'
// Every case here spawns the real CLI and does genuine multi-provider parse
// work; the 5s default is fine on a dev laptop and not on a shared 2-core
// runner, where individual cases have been observed needing 6-8s.
vi.setConfig({ testTimeout: 30_000 })
function runCli(args: string[], home: string, extraEnv: Record<string, string | undefined> = {}) {
return spawnSync(process.execPath, ['--import', 'tsx', 'src/cli.ts', ...args], {
@ -268,7 +273,7 @@ describe('codeburn status --format menubar-json', () => {
} finally {
await rm(home, { recursive: true, force: true })
}
}, 30_000)
})
it('keeps idle Claude config options visible for the selected period', async () => {
const home = await mkdtemp(join(tmpdir(), 'codeburn-menubar-claude-config-idle-'))