codeburn/vitest.config.ts
Tiago Santos 75c32e6d65
fix: fix and improve test isolation and collision with environment (#530)
* fix: fix and improve test isolation and collision with environment

* docs: remove unnecessary comment

* test(env-isolation): clear CODEBURN_FORCE_MACOS_MAJOR and pin TZ

Two env vars read in src/ were not isolated: CODEBURN_FORCE_MACOS_MAJOR
(now cleared so it cannot leak between tests) and TZ (now pinned to UTC,
since clearing it falls back to the OS zone and would shift date buckets
versus a clean CI runner).

---------

Co-authored-by: AgentSeal <hello@agentseal.org>
2026-06-20 13:42:10 +02:00

10 lines
373 B
TypeScript

import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
// Runs once per worker before any test. Scrubs the developer's shell so
// session-discovery env vars (CLAUDE_CONFIG_DIRS, HOME, XDG_*, every
// provider-specific *_HOME) don't bleed real local data into fixtures.
setupFiles: ['./tests/setup/env-isolation.ts'],
},
})