mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
782 B
782 B
title, outline
| title | outline |
|---|---|
| forceRerunTriggers | Config | deep |
forceRerunTriggers
- 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:
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.
:::