mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
25 lines
791 B
Markdown
25 lines
791 B
Markdown
---
|
|
title: forceRerunTriggers | Config
|
|
outline: deep
|
|
---
|
|
|
|
# forceRerunTriggers <CRoot />
|
|
|
|
- **Type**: `string[]`
|
|
- **Default:** `['**/package.json/**', '**/vitest.config.*/**', '**/vite.config.*/**']`
|
|
|
|
Glob pattern of file paths that will trigger the whole suite rerun. When paired with the `--changed` argument will run the whole test suite if the trigger is found in the git diff.
|
|
|
|
Useful if you are testing calling CLI commands, because Vite cannot construct a module graph:
|
|
|
|
```ts
|
|
test('execute a script', async () => {
|
|
// Vitest cannot rerun this test, if content of `dist/index.js` changes
|
|
await execa('node', ['dist/index.js'])
|
|
})
|
|
```
|
|
|
|
::: tip
|
|
Make sure that your files are not excluded by [`server.watch.ignored`](https://vitejs.dev/config/server-options.html#server-watch).
|
|
:::
|