Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/cli-emitters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'

import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'

// These specs spawn the real CLI (tsx compile + full parse) per test, which
// blows the 5s default under full parallel suite load while passing cleanly
// in isolation — the exact flake class #948 documented and CI has hit
// (cli-emitters timed out on a green PR). Same file-level remedy as
// cli-status-menubar.test.ts: a 30s ceiling for spawn-heavy suites only.
vi.setConfig({ testTimeout: 30_000 })

function runCli(args: string[], home: string) {
return spawnSync(process.execPath, ['--import', 'tsx', 'src/cli.ts', ...args], {
Expand Down
9 changes: 8 additions & 1 deletion tests/cli-json-daily.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { spawnSync } from 'node:child_process'

import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'

// These specs spawn the real CLI (tsx compile + full parse) per test, which
// blows the 5s default under full parallel suite load while passing cleanly
// in isolation — the exact flake class #948 documented and CI has hit
// (cli-emitters timed out on a green PR). Same file-level remedy as
// cli-status-menubar.test.ts: a 30s ceiling for spawn-heavy suites only.
vi.setConfig({ testTimeout: 30_000 })

function runCli(args: string[], home: string) {
return spawnSync(process.execPath, ['--import', 'tsx', 'src/cli.ts', ...args], {
Expand Down
7 changes: 7 additions & 0 deletions tests/spend-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import { describe, expect, it, vi } from 'vitest'

import type { DateRange, ProjectSummary, SessionSummary, TokenUsage } from '../src/types.js'

// These specs spawn the real CLI (tsx compile + full parse) per test, which
// blows the 5s default under full parallel suite load while passing cleanly
// in isolation — the exact flake class #948 documented and CI has hit
// (cli-emitters timed out on a green PR). Same file-level remedy as
// cli-status-menubar.test.ts: a 30s ceiling for spawn-heavy suites only.
vi.setConfig({ testTimeout: 30_000 })

const parserMock = vi.hoisted(() => ({
parseAllSessions: vi.fn(),
}))
Expand Down
Loading