diff --git a/docs/config/index.md b/docs/config/index.md index cb8b8eacc7ac..85a129fa9e2f 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -374,7 +374,7 @@ Glob pattern of file paths to be ignored from triggering watch rerun. - **Type**: `string[]` - **Default:** `[]` -Glob patter of file paths that will trigger the whole suite rerun. +Glob patter of file paths that will trigger the whole suite rerun. This 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: diff --git a/docs/guide/cli.md b/docs/guide/cli.md index e43fccc19775..ee9a04a0ce27 100644 --- a/docs/guide/cli.md +++ b/docs/guide/cli.md @@ -70,7 +70,7 @@ Clears cache folder. | `--environment ` | Runner environment (default: `node`) | | `--passWithNoTests` | Pass when no tests found | | `--allowOnly` | Allow tests and suites that are marked as `only` (default: false in CI, true otherwise) | -| `--changed [since]` | Run tests that are affected by the changed files (default: false). See [docs](#changed) | +| `--changed [since]` | Run tests that are affected by the changed files. (default: false). See [docs](#changed) | | `--shard ` | Execute tests in a specified shard | | `-h, --help` | Display available CLI options | @@ -83,6 +83,8 @@ Clears cache folder. To run tests against changes made in the last commit, you can use `--changed HEAD~1`. You can also pass commit hash or branch name. + If paired with the `forceRerunTriggers` config option it will run the whole test suite if a match is found. + ### shard - **Type**: `string`