spawn/packages/cli/bunfig.toml
A 69b6f8aa66
fix(test): fix 7 failing tests — GCP mock gaps and sandbox pollution (#2816)
- GCP coverage tests (6 failures): getServerIp, listServers, and
  authenticate tests did not mock the `which gcloud` spawnSync call
  inside requireGcloudCmd(), causing "gcloud CLI not found" errors.
  Add mockSpawnSyncWithGcloud/mockWhichGcloud helpers that satisfy
  the gcloud discovery call before the test-specific mock.

- Sandbox guardrail test (1 failure): cmd-uninstall-cov deletes
  ~/.spawn and other sandbox directories but never re-creates them.
  Since Bun runs test files in the same process, the fs-sandbox
  test then fails. Add afterEach restoration of sandbox dirs.

- Add coverageThreshold to bunfig.toml with correct syntax
  (coverageThreshold under [test], not [test.coverage])

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-19 23:43:13 -07:00

3 lines
101 B
TOML

[test]
preload = ["./src/__tests__/preload.ts"]
coverageThreshold = { lines = 0.8, functions = 0.9 }