mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
426 B
426 B
| title | outline |
|---|---|
| clearMocks | Config | deep |
clearMocks
- Type:
boolean - Default:
false
Should Vitest automatically call vi.clearAllMocks() before each test.
This will clear mock history without affecting mock implementations.
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
clearMocks: true,
},
})