···11+---
22+title: changed | Config
33+outline: deep
44+---
55+66+### changed <CRoot />
77+88+- **Type:** `boolean | string`
99+- **Default:** `false`
1010+- **CLI:** `--changed`, `--changed=HEAD~1`
1111+1212+Run tests only against changed files. If no value is provided, it will run tests against uncommitted changes (including staged and unstaged).
1313+1414+To run tests against changes made in the last commit, you can use `--changed HEAD~1`. You can also pass commit hash (e.g. `--changed 09a9920`) or branch name (e.g. `--changed origin/develop`).
1515+1616+When used with code coverage the report will contain only the files that were related to the changes.
1717+1818+If paired with the [`forceRerunTriggers`](/config/forcereruntriggers) config option it will run the whole test suite if at least one of the files listed in the `forceRerunTriggers` list changes. By default, changes to the Vitest config file and `package.json` will always rerun the whole suite.
+7
docs/guide/cli-generated.md
···541541542542Ignore any unhandled errors that occur
543543544544+### changed
545545+546546+- **CLI:** `--changed [since]`
547547+- **Config:** [changed](/config/changed)
548548+549549+Run tests that are affected by the changed files (default: `false`)
550550+544551### sequence.shuffle.files
545552546553- **CLI:** `--sequence.shuffle.files`
-13
docs/guide/cli.md
···189189190190<!--@include: ./cli-generated.md-->
191191192192-### changed
193193-194194-- **Type:** `boolean | string`
195195-- **Default:** false
196196-197197-Run tests only against changed files. If no value is provided, it will run tests against uncommitted changes (including staged and unstaged).
198198-199199-To run tests against changes made in the last commit, you can use `--changed HEAD~1`. You can also pass commit hash (e.g. `--changed 09a9920`) or branch name (e.g. `--changed origin/develop`).
200200-201201-When used with code coverage the report will contain only the files that were related to the changes.
202202-203203-If paired with the [`forceRerunTriggers`](/config/forcereruntriggers) config option it will run the whole test suite if at least one of the files listed in the `forceRerunTriggers` list changes. By default, changes to the Vitest config file and `package.json` will always rerun the whole suite.
204204-205192### shard
206193207194- **Type:** `string`
···985985 * @default true
986986 */
987987 strictTags?: boolean
988988+989989+ /**
990990+ * Runs tests that are affected by the changes in the repository, or between specified branch or commit hash
991991+ * Requires initialized git repository
992992+ * @default false
993993+ */
994994+ changed?: boolean | string
988995}
989996990997export interface TypecheckConfig {
···10721079 * @default 'test'
10731080 */
10741081 mode?: string
10751075-10761076- /**
10771077- * Runs tests that are affected by the changes in the repository, or between specified branch or commit hash
10781078- * Requires initialized git repository
10791079- * @default false
10801080- */
10811081- changed?: boolean | string
1082108210831083 /**
10841084 * Test suite shard to execute in a format of <index>/<count>.