Skip to content

Commit

Permalink
docs: add info about the cache directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jun 11, 2024
1 parent a60a140 commit a663c7b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,26 @@ Test above this limit will be queued to run when available slot appears.
Use this option if you want to disable the cache feature. At the moment Vitest stores cache for test results to run the longer and failed tests first.
The cache directory is controlled by the Vite's [`cacheDir`](https://vitejs.dev/config/shared-options.html#cachedir) option:
```ts
import { defineConfig } from 'vitest/config'

export default defineConfig({
cacheDir: 'custom-folder/.vitest'
})
```
You can limit the directory only for Vitest by using `process.env.VITEST`:
```ts
import { defineConfig } from 'vitest/config'

export default defineConfig({
cacheDir: process.env.VITEST ? 'custom-folder/.vitest' : undefined
})
```
### sequence
- **Type**: `{ sequencer?, shuffle?, seed?, hooks?, setupFiles? }`
Expand Down

0 comments on commit a663c7b

Please sign in to comment.