spawn/packages
B f88fb14c3d fix(tests): prevent telemetry singleton from polluting parallel test fetch mocks
The telemetry module's `_enabled` flag persists across parallel test files
when `telemetry.test.ts` calls `initTelemetry()` (which deletes BUN_ENV/NODE_ENV
guards). This causes `logWarn` → `captureWarning` → `sendEvent` → `fetch()` to
fire unexpected calls through other tests' `global.fetch` mocks, breaking
callCount-based assertions in `hetzner-cov.test.ts` and `digitalocean-token.test.ts`.

Fix:
- Add runtime env guard in `sendEvent()` so telemetry never fires in test env
- Set `SPAWN_TELEMETRY=0` in test preload as defense-in-depth

Agent: code-health
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-07 00:18:50 +00:00
..
cli fix(tests): prevent telemetry singleton from polluting parallel test fetch mocks 2026-05-07 00:18:50 +00:00
shared fix: rethrow normalized Error in tryCatchIf/asyncTryCatchIf (#2930) 2026-03-23 19:33:05 -07:00