You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom provider for detecting changed files. Used with the [`--changed`](/guide/cli#changed) flag to determine which files have been modified.
431
+
432
+
By default, Vitest uses Git to detect changed files. You can provide a custom implementation of the `VCSProvider` interface to use a different version control system:
433
+
434
+
```ts [vitest.config.ts]
435
+
import { defineConfig } from'vitest/config'
436
+
437
+
exportdefaultdefineConfig({
438
+
test: {
439
+
experimental: {
440
+
vcsProvider: {
441
+
async findChangedFiles({ root, changedSince }) {
442
+
// return paths of changed files
443
+
return []
444
+
},
445
+
},
446
+
},
447
+
},
448
+
})
449
+
```
450
+
451
+
You can also pass a string path to a module with a default export that implements the `VCSProvider` interface:
Controls whether Vitest will use Node.js Loader API to process in-source or mocked files. This has no effect if `viteModuleRunner` is enabled. Disabling this can increase performance. (default: `true`)
description: 'Controls whether Vitest will use Node.js Loader API to process in-source or mocked files. This has no effect if `viteModuleRunner` is enabled. Disabling this can increase performance. (default: `true`)',
903
903
},
904
+
vcsProvider: {
905
+
argument: '<path>',
906
+
description: 'Custom provider for detecting changed files. (default: `git`)',
0 commit comments