### root - **CLI:** `-r, --root ` - **Config:** [root](/config/root) Root path ### config - **CLI:** `-c, --config ` Path to config file ### update - **CLI:** `-u, --update [type]` - **Config:** [update](/config/update) Update snapshot (accepts boolean, "new", "all" or "none") ### watch - **CLI:** `-w, --watch` - **Config:** [watch](/config/watch) Enable watch mode ### testNamePattern - **CLI:** `-t, --testNamePattern ` - **Config:** [testNamePattern](/config/testnamepattern) Run tests with full names matching the specified regexp pattern ### dir - **CLI:** `--dir ` - **Config:** [dir](/config/dir) Base directory to scan for the test files ### ui - **CLI:** `--ui` Enable UI ### open - **CLI:** `--open` - **Config:** [open](/config/open) Open UI automatically (default: `!process.env.CI`) ### api.port - **CLI:** `--api.port [port]` Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to `51204` ### api.host - **CLI:** `--api.host [host]` Specify which IP addresses the server should listen on. Set this to `0.0.0.0` or `true` to listen on all addresses, including LAN and public addresses ### api.strictPort - **CLI:** `--api.strictPort` Set to true to exit if port is already in use, instead of automatically trying the next available port ### api.allowExec - **CLI:** `--api.allowExec` - **Config:** [api.allowExec](/config/api#api-allowexec) Allow API to execute code. (Be careful when enabling this option in untrusted environments) ### api.allowWrite - **CLI:** `--api.allowWrite` - **Config:** [api.allowWrite](/config/api#api-allowwrite) Allow API to edit files. (Be careful when enabling this option in untrusted environments) ### silent - **CLI:** `--silent [value]` - **Config:** [silent](/config/silent) Silent console output from tests. Use `'passed-only'` to see logs from failing tests only. ### hideSkippedTests - **CLI:** `--hideSkippedTests` Hide logs for skipped tests ### reporters - **CLI:** `--reporter ` - **Config:** [reporters](/config/reporters) Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) ### outputFile - **CLI:** `--outputFile ` - **Config:** [outputFile](/config/outputfile) Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: `--outputFile.tap=./tap.txt`) ### coverage.provider - **CLI:** `--coverage.provider ` - **Config:** [coverage.provider](/config/coverage#coverage-provider) Select the tool for coverage collection, available values are: "v8", "istanbul" and "custom" ### coverage.enabled - **CLI:** `--coverage.enabled` - **Config:** [coverage.enabled](/config/coverage#coverage-enabled) Enables coverage collection. Can be overridden using the `--coverage` CLI option (default: `false`) ### coverage.include - **CLI:** `--coverage.include ` - **Config:** [coverage.include](/config/coverage#coverage-include) Files included in coverage as glob patterns. May be specified more than once when using multiple patterns. By default only files covered by tests are included. ### coverage.exclude - **CLI:** `--coverage.exclude ` - **Config:** [coverage.exclude](/config/coverage#coverage-exclude) Files to be excluded in coverage. May be specified more than once when using multiple extensions. ### coverage.clean - **CLI:** `--coverage.clean` - **Config:** [coverage.clean](/config/coverage#coverage-clean) Clean coverage results before running tests (default: true) ### coverage.cleanOnRerun - **CLI:** `--coverage.cleanOnRerun` - **Config:** [coverage.cleanOnRerun](/config/coverage#coverage-cleanonrerun) Clean coverage report on watch rerun (default: true) ### coverage.reportsDirectory - **CLI:** `--coverage.reportsDirectory ` - **Config:** [coverage.reportsDirectory](/config/coverage#coverage-reportsdirectory) Directory to write coverage report to (default: ./coverage) ### coverage.reporter - **CLI:** `--coverage.reporter ` - **Config:** [coverage.reporter](/config/coverage#coverage-reporter) Coverage reporters to use. Visit [`coverage.reporter`](/config/coverage#coverage-reporter) for more information (default: `["text", "html", "clover", "json"]`) ### coverage.reportOnFailure - **CLI:** `--coverage.reportOnFailure` - **Config:** [coverage.reportOnFailure](/config/coverage#coverage-reportonfailure) Generate coverage report even when tests fail (default: `false`) ### coverage.allowExternal - **CLI:** `--coverage.allowExternal` - **Config:** [coverage.allowExternal](/config/coverage#coverage-allowexternal) Collect coverage of files outside the project root (default: `false`) ### coverage.skipFull - **CLI:** `--coverage.skipFull` - **Config:** [coverage.skipFull](/config/coverage#coverage-skipfull) Do not show files with 100% statement, branch, and function coverage (default: `false`) ### coverage.thresholds.100 - **CLI:** `--coverage.thresholds.100` - **Config:** [coverage.thresholds.100](/config/coverage#coverage-thresholds-100) Shortcut to set all coverage thresholds to 100 (default: `false`) ### coverage.thresholds.perFile - **CLI:** `--coverage.thresholds.perFile ` - **Config:** [coverage.thresholds.perFile](/config/coverage#coverage-thresholds-perfile) Check thresholds per file. See `--coverage.thresholds.lines`, `--coverage.thresholds.functions`, `--coverage.thresholds.branches` and `--coverage.thresholds.statements` for the actual thresholds (default: `false`). Object form is available in config files only. ### coverage.thresholds.autoUpdate - **CLI:** `--coverage.thresholds.autoUpdate ` - **Config:** [coverage.thresholds.autoUpdate](/config/coverage#coverage-thresholds-autoupdate) Update threshold values: "lines", "functions", "branches" and "statements" to configuration file when current coverage is above the configured thresholds (default: `false`) ### coverage.thresholds.lines - **CLI:** `--coverage.thresholds.lines ` Threshold for lines. Visit [istanbuljs](https://github.com/istanbuljs/nyc#coverage-thresholds) for more information. This option is not available for custom providers ### coverage.thresholds.functions - **CLI:** `--coverage.thresholds.functions ` Threshold for functions. Visit [istanbuljs](https://github.com/istanbuljs/nyc#coverage-thresholds) for more information. This option is not available for custom providers ### coverage.thresholds.branches - **CLI:** `--coverage.thresholds.branches ` Threshold for branches. Visit [istanbuljs](https://github.com/istanbuljs/nyc#coverage-thresholds) for more information. This option is not available for custom providers ### coverage.thresholds.statements - **CLI:** `--coverage.thresholds.statements ` Threshold for statements. Visit [istanbuljs](https://github.com/istanbuljs/nyc#coverage-thresholds) for more information. This option is not available for custom providers ### coverage.ignoreClassMethods - **CLI:** `--coverage.ignoreClassMethods ` - **Config:** [coverage.ignoreClassMethods](/config/coverage#coverage-ignoreclassmethods) Array of class method names to ignore for coverage. Visit [istanbuljs](https://github.com/istanbuljs/nyc#ignoring-methods) for more information. This option is only available for the istanbul providers (default: `[]`) ### coverage.processingConcurrency - **CLI:** `--coverage.processingConcurrency ` - **Config:** [coverage.processingConcurrency](/config/coverage#coverage-processingconcurrency) Concurrency limit used when processing the coverage results. (default min between 20 and the number of CPUs) ### coverage.customProviderModule - **CLI:** `--coverage.customProviderModule ` - **Config:** [coverage.customProviderModule](/config/coverage#coverage-customprovidermodule) Specifies the module name or path for the custom coverage provider module. Visit [Custom Coverage Provider](/guide/coverage#custom-coverage-provider) for more information. This option is only available for custom providers ### coverage.watermarks.statements - **CLI:** `--coverage.watermarks.statements ` High and low watermarks for statements in the format of `,` ### coverage.watermarks.lines - **CLI:** `--coverage.watermarks.lines ` High and low watermarks for lines in the format of `,` ### coverage.watermarks.branches - **CLI:** `--coverage.watermarks.branches ` High and low watermarks for branches in the format of `,` ### coverage.watermarks.functions - **CLI:** `--coverage.watermarks.functions ` High and low watermarks for functions in the format of `,` ### coverage.changed - **CLI:** `--coverage.changed ` - **Config:** [coverage.changed](/config/coverage#coverage-changed) Collect coverage only for files changed since a specified commit or branch (e.g., `origin/main` or `HEAD~1`). Inherits value from `--changed` by default. ### coverage.excludeAfterRemap - **CLI:** `--coverage.excludeAfterRemap` - **Config:** [coverage.excludeAfterRemap](/config/coverage#coverage-excludeafterremap) Apply exclusions again after coverage has been remapped to original sources. (default: false) ### coverage.htmlDir - **CLI:** `--coverage.htmlDir ` - **Config:** [coverage.htmlDir](/config/coverage#coverage-htmldir) Directory of HTML coverage output to be served in UI mode and HTML reporter. ### coverage.autoAttachSubprocess - **CLI:** `--coverage.autoAttachSubprocess` - **Config:** [coverage.autoAttachSubprocess](/config/coverage#coverage-autoattachsubprocess) Track coverage of the `node:child_process` and `node:worker_threads` spawned during test run. Supported only by `v8` provider. (default: false) ### mode - **CLI:** `--mode ` - **Config:** [mode](/config/mode) Override Vite mode (default: `test`) ### isolate - **CLI:** `--isolate` - **Config:** [isolate](/config/isolate) Run every test file in isolation. To disable isolation, use `--no-isolate` (default: `true`) ### globals - **CLI:** `--globals` - **Config:** [globals](/config/globals) Inject apis globally ### injectCjsGlobals - **CLI:** `--injectCjsGlobals` - **Config:** [injectCjsGlobals](/config/injectcjsglobals) Inject CommonJS variables (`module`, `exports`, `require`, `__filename`, `__dirname`) into every test module. To disable, use `--no-inject-cjs-globals` (default: `true`) ### dom - **CLI:** `--dom` Mock browser API with happy-dom ### browser.enabled - **CLI:** `--browser.enabled` - **Config:** [browser.enabled](/config/browser/enabled) Run tests in the browser. Equivalent to `--browser.enabled` (default: `false`) ### browser.name - **CLI:** `--browser.name ` Run all tests in a specific browser. Some browsers are only available for specific providers (see `--browser.provider`). ### browser.headless - **CLI:** `--browser.headless` - **Config:** [browser.headless](/config/browser/headless) Run the browser in headless mode (i.e. without opening the GUI (Graphical User Interface)). If you are running Vitest in CI, it will be enabled by default (default: `process.env.CI`) ### browser.ui - **CLI:** `--browser.ui` - **Config:** [browser.ui](/config/browser/ui) Show Vitest UI when running tests (default: `!process.env.CI`) ### browser.detailsPanelPosition - **CLI:** `--browser.detailsPanelPosition ` - **Config:** [browser.detailsPanelPosition](/config/browser/detailspanelposition) Default position for the details panel in browser mode. Either `right` (horizontal split) or `bottom` (vertical split) (default: `right`) ### browser.connectTimeout - **CLI:** `--browser.connectTimeout ` - **Config:** [browser.connectTimeout](/config/browser/connecttimeout) If connection to the browser takes longer, the test suite will fail (default: `60_000`) ### browser.dependencySourcemaps - **CLI:** `--browser.dependencySourcemaps` - **Config:** [browser.dependencySourcemaps](/config/browser/dependencysourcemaps) Serve sourcemaps of dependencies to the browser in headless runs, used by devtools when debugging into `node_modules`. Reported test errors are source-mapped either way. Use `--browser.dependencySourcemaps=false` to speed up test runs if you don't step into dependency code (default: `true`) ### browser.trackUnhandledErrors - **CLI:** `--browser.trackUnhandledErrors` - **Config:** [browser.trackUnhandledErrors](/config/browser/trackunhandlederrors) Control if Vitest catches uncaught exceptions so they can be reported (default: `true`) ### browser.trace - **CLI:** `--browser.trace ` - **Config:** [browser.trace](/config/browser/trace) Enable trace view mode. Supported: "on", "off", "on-first-retry", "on-all-retries", "retain-on-failure". ### browser.traceView.enabled - **CLI:** `--browser.traceView.enabled` - **Config:** [browser.traceView.enabled](/config/browser/traceview#traceview-enabled) Enable Vitest trace-view collection for browser tests (default: `false`) ### browser.traceView.recordCanvas - **CLI:** `--browser.traceView.recordCanvas` - **Config:** [browser.traceView.recordCanvas](/config/browser/traceview#traceview-recordcanvas) Capture canvas pixels in trace-view snapshots (default: `false`) ### browser.traceView.inlineImages - **CLI:** `--browser.traceView.inlineImages` - **Config:** [browser.traceView.inlineImages](/config/browser/traceview#traceview-inlineimages) Inline loaded image pixels in trace-view snapshots (default: `false`) ### browser.locators.exact - **CLI:** `--browser.locators.exact` - **Config:** [browser.locators.exact](/config/browser/locators#locators-exact) Should locators match the text exactly by default (default: `true`) ### pool - **CLI:** `--pool ` - **Config:** [pool](/config/pool) Specify pool, if not running in the browser (default: `forks`) ### execArgv - **CLI:** `--execArgv