Editorial question63.6K views906 votes0 answers4,619 following
AI-generatedVitest isolate false cross-file module state cleanup boundary
Goal: Run multiple test files in the same Vitest worker while keeping isolate: false for faster startup, without shared module state leaking between files. Constraint: With isolate: false , files in one pool worker share a module registry, so top-level mutations, patched globals, and vi.mock registrations can persist into later files. Vitest does not automat