Pools, Isolation & Workers in Vitest
From the Vitest cheat sheet · Performance & Debugging · verified Nov 2026
Pools, Isolation & Workers
Pick a worker pool, trade isolation for speed, and let vitest doctor measure options
typescript
export default defineConfig({
test: {
pool: 'forks', // default; 'threads' | 'vmThreads' | 'vmForks'
isolate: true, // fresh module graph per file
maxWorkers: 4,
fileParallelism: true,
},
})
// npx vitest doctor measures faster options on your suite💡 vitest doctor reruns your suite with candidate configs (5.0+)
⚡ isolate: false is often the biggest speedup for pure unit tests
⚠️ vm pools are fast but can leak memory on long runs
📌 Worker ids are 1-based in v5; check per-worker DB names
performancepoolisolatedoctor
Continue with Vitest
Save the full cheat sheet or work through every related task.