[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

docs(typo): fix doucment's some typo (#10083)

authored by

NoiseFan and committed by
GitHub
(Apr 21, 2026, 12:55 PM +0200) e7bc1549 271d995b

+122 -122
+2 -2
docs/api/assert.md
··· 36 36 ## isOk 37 37 38 38 - **Type:** `<T>(value: T, message?: string) => asserts value` 39 - - **Alias** `ok` 39 + - **Alias:** `ok` 40 40 41 41 Assert that the given `value` is truthy. 42 42 ··· 52 52 ## isNotOk 53 53 54 54 - **Type:** `<T>(value: T, message?: string) => void` 55 - - **Alias** `notOk` 55 + - **Alias:** `notOk` 56 56 57 57 Assert that the given `value` is falsy. 58 58
+17 -17
docs/api/expect.md
··· 1075 1075 1076 1076 ## toHaveBeenCalledTimes 1077 1077 1078 - - **Type**: `(amount: number) => Awaitable<void>` 1078 + - **Type:** `(amount: number) => Awaitable<void>` 1079 1079 1080 1080 This assertion checks if a function was called a certain amount of times. Requires a spy function to be passed to `expect`. 1081 1081 ··· 1100 1100 1101 1101 ## toHaveBeenCalledWith 1102 1102 1103 - - **Type**: `(...args: any[]) => Awaitable<void>` 1103 + - **Type:** `(...args: any[]) => Awaitable<void>` 1104 1104 1105 1105 This assertion checks if a function was called at least once with certain parameters. Requires a spy function to be passed to `expect`. 1106 1106 ··· 1126 1126 1127 1127 ## toHaveBeenCalledBefore 1128 1128 1129 - - **Type**: `(mock: MockInstance, failIfNoFirstInvocation?: boolean) => Awaitable<void>` 1129 + - **Type:** `(mock: MockInstance, failIfNoFirstInvocation?: boolean) => Awaitable<void>` 1130 1130 1131 1131 This assertion checks if a `Mock` was called before another `Mock`. 1132 1132 ··· 1145 1145 1146 1146 ## toHaveBeenCalledAfter 1147 1147 1148 - - **Type**: `(mock: MockInstance, failIfNoFirstInvocation?: boolean) => Awaitable<void>` 1148 + - **Type:** `(mock: MockInstance, failIfNoFirstInvocation?: boolean) => Awaitable<void>` 1149 1149 1150 1150 This assertion checks if a `Mock` was called after another `Mock`. 1151 1151 ··· 1164 1164 1165 1165 ## toHaveBeenCalledExactlyOnceWith 1166 1166 1167 - - **Type**: `(...args: any[]) => Awaitable<void>` 1167 + - **Type:** `(...args: any[]) => Awaitable<void>` 1168 1168 1169 1169 This assertion checks if a function was called exactly once and with certain parameters. Requires a spy function to be passed to `expect`. 1170 1170 ··· 1188 1188 1189 1189 ## toHaveBeenLastCalledWith 1190 1190 1191 - - **Type**: `(...args: any[]) => Awaitable<void>` 1191 + - **Type:** `(...args: any[]) => Awaitable<void>` 1192 1192 1193 1193 This assertion checks if a function was called with certain parameters at its last invocation. Requires a spy function to be passed to `expect`. 1194 1194 ··· 1214 1214 1215 1215 ## toHaveBeenNthCalledWith 1216 1216 1217 - - **Type**: `(time: number, ...args: any[]) => Awaitable<void>` 1217 + - **Type:** `(time: number, ...args: any[]) => Awaitable<void>` 1218 1218 1219 1219 This assertion checks if a function was called with certain parameters at the certain time. The count starts at 1. So, to check the second entry, you would write `.toHaveBeenNthCalledWith(2, ...)`. 1220 1220 ··· 1241 1241 1242 1242 ## toHaveReturned 1243 1243 1244 - - **Type**: `() => Awaitable<void>` 1244 + - **Type:** `() => Awaitable<void>` 1245 1245 1246 1246 This assertion checks if a function has successfully returned a value at least once (i.e., did not throw an error). Requires a spy function to be passed to `expect`. 1247 1247 ··· 1265 1265 1266 1266 ## toHaveReturnedTimes 1267 1267 1268 - - **Type**: `(amount: number) => Awaitable<void>` 1268 + - **Type:** `(amount: number) => Awaitable<void>` 1269 1269 1270 1270 This assertion checks if a function has successfully returned a value an exact amount of times (i.e., did not throw an error). Requires a spy function to be passed to `expect`. 1271 1271 ··· 1284 1284 1285 1285 ## toHaveReturnedWith 1286 1286 1287 - - **Type**: `(returnValue: any) => Awaitable<void>` 1287 + - **Type:** `(returnValue: any) => Awaitable<void>` 1288 1288 1289 1289 You can call this assertion to check if a function has successfully returned a value with certain parameters at least once. Requires a spy function to be passed to `expect`. 1290 1290 ··· 1302 1302 1303 1303 ## toHaveLastReturnedWith 1304 1304 1305 - - **Type**: `(returnValue: any) => Awaitable<void>` 1305 + - **Type:** `(returnValue: any) => Awaitable<void>` 1306 1306 1307 1307 You can call this assertion to check if a function has successfully returned a certain value when it was last invoked. Requires a spy function to be passed to `expect`. 1308 1308 ··· 1321 1321 1322 1322 ## toHaveNthReturnedWith 1323 1323 1324 - - **Type**: `(time: number, returnValue: any) => Awaitable<void>` 1324 + - **Type:** `(time: number, returnValue: any) => Awaitable<void>` 1325 1325 1326 1326 You can call this assertion to check if a function has successfully returned a value with certain parameters on a certain call. Requires a spy function to be passed to `expect`. 1327 1327 ··· 1342 1342 1343 1343 ## toHaveResolved 1344 1344 1345 - - **Type**: `() => Awaitable<void>` 1345 + - **Type:** `() => Awaitable<void>` 1346 1346 1347 1347 This assertion checks if a function has successfully resolved a value at least once (i.e., did not reject). Requires a spy function to be passed to `expect`. 1348 1348 ··· 1368 1368 1369 1369 ## toHaveResolvedTimes 1370 1370 1371 - - **Type**: `(amount: number) => Awaitable<void>` 1371 + - **Type:** `(amount: number) => Awaitable<void>` 1372 1372 1373 1373 This assertion checks if a function has successfully resolved a value an exact amount of times (i.e., did not reject). Requires a spy function to be passed to `expect`. 1374 1374 ··· 1389 1389 1390 1390 ## toHaveResolvedWith 1391 1391 1392 - - **Type**: `(returnValue: any) => Awaitable<void>` 1392 + - **Type:** `(returnValue: any) => Awaitable<void>` 1393 1393 1394 1394 You can call this assertion to check if a function has successfully resolved a certain value at least once. Requires a spy function to be passed to `expect`. 1395 1395 ··· 1409 1409 1410 1410 ## toHaveLastResolvedWith 1411 1411 1412 - - **Type**: `(returnValue: any) => Awaitable<void>` 1412 + - **Type:** `(returnValue: any) => Awaitable<void>` 1413 1413 1414 1414 You can call this assertion to check if a function has successfully resolved a certain value when it was last invoked. Requires a spy function to be passed to `expect`. 1415 1415 ··· 1430 1430 1431 1431 ## toHaveNthResolvedWith 1432 1432 1433 - - **Type**: `(time: number, returnValue: any) => Awaitable<void>` 1433 + - **Type:** `(time: number, returnValue: any) => Awaitable<void>` 1434 1434 1435 1435 You can call this assertion to check if a function has successfully resolved a certain value on a specific invocation. Requires a spy function to be passed to `expect`. 1436 1436
+2 -2
docs/config/allowonly.md
··· 5 5 6 6 # allowOnly 7 7 8 - - **Type**: `boolean` 9 - - **Default**: `!process.env.CI` 8 + - **Type:** `boolean` 9 + - **Default:** `!process.env.CI` 10 10 - **CLI:** `--allowOnly`, `--allowOnly=false` 11 11 12 12 By default, Vitest does not permit tests marked with the [`only`](/api/test#test-only) flag in Continuous Integration (CI) environments. Conversely, in local development environments, Vitest allows these tests to run.
+1 -1
docs/config/bail.md
··· 7 7 8 8 - **Type:** `number` 9 9 - **Default:** `0` 10 - - **CLI**: `--bail=<value>` 10 + - **CLI:** `--bail=<value>` 11 11 12 12 Stop test execution when given number of tests have failed. 13 13
+2 -2
docs/config/cache.md
··· 5 5 6 6 # cache <CRoot /> 7 7 8 - - **Type**: `false` 9 - - **CLI**: `--no-cache`, `--cache=false` 8 + - **Type:** `false` 9 + - **CLI:** `--no-cache`, `--cache=false` 10 10 11 11 Use this option if you want to disable the cache feature. At the moment Vitest stores cache for test results to run the longer and failed tests first. 12 12
+1 -1
docs/config/coverage.md
··· 65 65 - **Available for providers:** `'v8' | 'istanbul'` 66 66 - **CLI:** `--coverage.clean`, `--coverage.clean=false` 67 67 68 - Clean coverage results before running tests 68 + Clean coverage results before running tests. 69 69 70 70 ## coverage.cleanOnRerun 71 71
+9 -9
docs/config/css.md
··· 5 5 6 6 # css 7 7 8 - - **Type**: `boolean | { include?, exclude?, modules? }` 8 + - **Type:** `boolean | { include?, exclude?, modules? }` 9 9 10 10 Configure if CSS should be processed. When excluded, CSS files will be replaced with empty strings to bypass the subsequent processing. CSS Modules will return a proxy to not affect runtime. 11 11 ··· 15 15 16 16 ## css.include 17 17 18 - - **Type**: `RegExp | RegExp[]` 19 - - **Default**: `[]` 18 + - **Type:** `RegExp | RegExp[]` 19 + - **Default:** `[]` 20 20 21 21 RegExp pattern for files that should return actual CSS and will be processed by Vite pipeline. 22 22 ··· 26 26 27 27 ## css.exclude 28 28 29 - - **Type**: `RegExp | RegExp[]` 30 - - **Default**: `[]` 29 + - **Type:** `RegExp | RegExp[]` 30 + - **Default:** `[]` 31 31 32 32 RegExp pattern for files that will return an empty CSS file. 33 33 34 34 ## css.modules 35 35 36 - - **Type**: `{ classNameStrategy? }` 37 - - **Default**: `{}` 36 + - **Type:** `{ classNameStrategy? }` 37 + - **Default:** `{}` 38 38 39 39 ### css.modules.classNameStrategy 40 40 41 - - **Type**: `'stable' | 'scoped' | 'non-scoped'` 42 - - **Default**: `'stable'` 41 + - **Type:** `'stable' | 'scoped' | 'non-scoped'` 42 + - **Default:** `'stable'` 43 43 44 44 If you decide to process CSS files, you can configure if class names inside CSS modules should be scoped. You can choose one of the options: 45 45
+2 -2
docs/config/dangerouslyignoreunhandlederrors.md
··· 5 5 6 6 # dangerouslyIgnoreUnhandledErrors <CRoot /> 7 7 8 - - **Type**: `boolean` 9 - - **Default**: `false` 8 + - **Type:** `boolean` 9 + - **Default:** `false` 10 10 - **CLI:** 11 11 - `--dangerouslyIgnoreUnhandledErrors` 12 12 - `--dangerouslyIgnoreUnhandledErrors=false`
+1 -1
docs/config/deps.md
··· 111 111 ## deps.moduleDirectories 112 112 113 113 - **Type:** `string[]` 114 - - **Default**: `['node_modules']` 114 + - **Default:** `['node_modules']` 115 115 116 116 A list of directories that should be treated as module directories. This config option affects the behavior of [`vi.mock`](/api/vi#vi-mock): when no factory is provided and the path of what you are mocking matches one of the `moduleDirectories` values, Vitest will try to resolve the mock by looking for a `__mocks__` folder in the [root](/config/root) of the project. 117 117
+14 -14
docs/config/diff.md
··· 56 56 57 57 ## diff.expand 58 58 59 - - **Type**: `boolean` 60 - - **Default**: `true` 59 + - **Type:** `boolean` 60 + - **Default:** `true` 61 61 - **CLI:** `--diff.expand=false` 62 62 63 63 Expand all common lines. 64 64 65 65 ## diff.truncateThreshold 66 66 67 - - **Type**: `number` 68 - - **Default**: `0` 67 + - **Type:** `number` 68 + - **Default:** `0` 69 69 - **CLI:** `--diff.truncateThreshold=<path>` 70 70 71 71 The maximum length of diff result to be displayed. Diffs above this threshold will be truncated. ··· 73 73 74 74 ## diff.truncateAnnotation 75 75 76 - - **Type**: `string` 77 - - **Default**: `'... Diff result is truncated'` 76 + - **Type:** `string` 77 + - **Default:** `'... Diff result is truncated'` 78 78 - **CLI:** `--diff.truncateAnnotation=<annotation>` 79 79 80 80 Annotation that is output at the end of diff result if it's truncated. 81 81 82 82 ## diff.truncateAnnotationColor 83 83 84 - - **Type**: `DiffOptionsColor = (arg: string) => string` 85 - - **Default**: `noColor = (string: string): string => string` 84 + - **Type:** `DiffOptionsColor = (arg: string) => string` 85 + - **Default:** `noColor = (string: string): string => string` 86 86 87 87 Color of truncate annotation, default is output with no color. 88 88 89 89 ## diff.printBasicPrototype 90 90 91 - - **Type**: `boolean` 92 - - **Default**: `false` 91 + - **Type:** `boolean` 92 + - **Default:** `false` 93 93 94 - Print basic prototype `Object` and `Array` in diff output 94 + Print basic prototype `Object` and `Array` in diff output. 95 95 96 96 ## diff.maxDepth 97 97 98 - - **Type**: `number` 99 - - **Default**: `20` (or `8` when comparing different types) 98 + - **Type:** `number` 99 + - **Default:** `20` (or `8` when comparing different types) 100 100 101 - Limit the depth to recurse when printing nested objects 101 + Limit the depth to recurse when printing nested objects.
+1 -1
docs/config/forcereruntriggers.md
··· 5 5 6 6 # forceRerunTriggers <CRoot /> 7 7 8 - - **Type**: `string[]` 8 + - **Type:** `string[]` 9 9 - **Default:** `['**/package.json/**', '**/vitest.config.*/**', '**/vite.config.*/**']` 10 10 11 11 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.
+2 -2
docs/config/logheapusage.md
··· 5 5 6 6 # logHeapUsage 7 7 8 - - **Type**: `boolean` 9 - - **Default**: `false` 8 + - **Type:** `boolean` 9 + - **Default:** `false` 10 10 - **CLI:** `--logHeapUsage`, `--logHeapUsage=false` 11 11 12 12 Show heap usage after each test. Useful for debugging memory leaks.
+3 -3
docs/config/maxconcurrency.md
··· 5 5 6 6 # maxConcurrency 7 7 8 - - **Type**: `number` 9 - - **Default**: `5` 10 - - **CLI**: `--max-concurrency=10`, `--maxConcurrency=10` 8 + - **Type:** `number` 9 + - **Default:** `5` 10 + - **CLI:** `--max-concurrency=10`, `--maxConcurrency=10` 11 11 12 12 The maximum number of tests and hooks that can run at the same time when using `test.concurrent` or `describe.concurrent`. 13 13
+1 -1
docs/config/mode.md
··· 9 9 - **CLI:** `--mode=staging` 10 10 - **Default:** `'test'` 11 11 12 - Overrides Vite mode 12 + Overrides Vite mode.
+1 -1
docs/config/onstacktrace.md
··· 5 5 6 6 # onStackTrace <CRoot /> 7 7 8 - - **Type**: `(error: Error, frame: ParsedStack) => boolean | void` 8 + - **Type:** `(error: Error, frame: ParsedStack) => boolean | void` 9 9 10 10 Apply a filtering function to each frame of each stack trace when handling errors. This does not apply to stack traces printed by [`printConsoleTrace`](/config/printconsoletrace#printconsoletrace). The first argument, `error`, is a `TestError`. 11 11
+2 -2
docs/config/passwithnotests.md
··· 5 5 6 6 # passWithNoTests <CRoot /> 7 7 8 - - **Type**: `boolean` 9 - - **Default**: `false` 8 + - **Type:** `boolean` 9 + - **Default:** `false` 10 10 - **CLI:** `--passWithNoTests`, `--passWithNoTests=false` 11 11 12 12 Vitest will not fail, if no tests will be found.
+1 -1
docs/config/pool.md
··· 13 13 14 14 ## threads 15 15 16 - Enable multi-threading. When using threads you are unable to use process related APIs such as `process.chdir()`. Some libraries written in native languages, such as Prisma, `bcrypt` and `canvas`, have problems when running in multiple threads and run into segfaults. In these cases it is advised to use `forks` pool instead. 16 + Enable multi-threading. When using threads you are unable to use process related APIs such as `process.chdir()`. Some libraries written in native languages, such as `Prisma`, `bcrypt` and `canvas`, have problems when running in multiple threads and run into segfaults. In these cases it is advised to use `forks` pool instead. 17 17 18 18 ## forks 19 19
+2 -2
docs/config/resolvesnapshotpath.md
··· 5 5 6 6 # resolveSnapshotPath <CRoot /> 7 7 8 - - **Type**: `(testPath: string, snapExtension: string, context: { config: SerializedConfig }) => string` 9 - - **Default**: stores snapshot files in `__snapshots__` directory 8 + - **Type:** `(testPath: string, snapExtension: string, context: { config: SerializedConfig }) => string` 9 + - **Default:** stores snapshot files in `__snapshots__` directory 10 10 11 11 Overrides default snapshot path. For example, to store snapshots next to test files: 12 12
+2 -2
docs/config/runner.md
··· 5 5 6 6 # runner 7 7 8 - - **Type**: `VitestRunnerConstructor` 9 - - **Default**: `node`, when running tests, or `benchmark`, when running benchmarks 8 + - **Type:** `VitestRunnerConstructor` 9 + - **Default:** `node`, when running tests, or `benchmark`, when running benchmarks 10 10 11 11 Path to a custom test runner. This is an advanced feature and should be used with custom library runners. You can read more about it in [the documentation](/api/advanced/runner).
+24 -24
docs/config/sequence.md
··· 5 5 6 6 # sequence 7 7 8 - - **Type**: `{ sequencer?, shuffle?, seed?, hooks?, setupFiles?, groupOrder }` 8 + - **Type:** `{ sequencer?, shuffle?, seed?, hooks?, setupFiles?, groupOrder }` 9 9 10 10 Options for how tests should be sorted. 11 11 ··· 17 17 18 18 ## sequence.sequencer <CRoot /> 19 19 20 - - **Type**: `TestSequencerConstructor` 21 - - **Default**: `BaseSequencer` 20 + - **Type:** `TestSequencerConstructor` 21 + - **Default:** `BaseSequencer` 22 22 23 23 A custom class that defines methods for sharding and sorting. You can extend `BaseSequencer` from `vitest/node`, if you only need to redefine one of the `sort` and `shard` methods, but both should exist. 24 24 ··· 91 91 92 92 ## sequence.shuffle 93 93 94 - - **Type**: `boolean | { files?, tests? }` 95 - - **Default**: `false` 96 - - **CLI**: `--sequence.shuffle`, `--sequence.shuffle=false` 94 + - **Type:** `boolean | { files?, tests? }` 95 + - **Default:** `false` 96 + - **CLI:** `--sequence.shuffle`, `--sequence.shuffle=false` 97 97 98 98 If you want files and tests to run randomly, you can enable it with this option, or CLI argument [`--sequence.shuffle`](/guide/cli). 99 99 ··· 101 101 102 102 ### sequence.shuffle.files {#sequence-shuffle-files} 103 103 104 - - **Type**: `boolean` 105 - - **Default**: `false` 106 - - **CLI**: `--sequence.shuffle.files`, `--sequence.shuffle.files=false` 104 + - **Type:** `boolean` 105 + - **Default:** `false` 106 + - **CLI:** `--sequence.shuffle.files`, `--sequence.shuffle.files=false` 107 107 108 108 Whether to randomize files, be aware that long running tests will not start earlier if you enable this option. 109 109 110 110 ### sequence.shuffle.tests {#sequence-shuffle-tests} 111 111 112 - - **Type**: `boolean` 113 - - **Default**: `false` 114 - - **CLI**: `--sequence.shuffle.tests`, `--sequence.shuffle.tests=false` 112 + - **Type:** `boolean` 113 + - **Default:** `false` 114 + - **CLI:** `--sequence.shuffle.tests`, `--sequence.shuffle.tests=false` 115 115 116 116 Whether to randomize tests. 117 117 118 118 ## sequence.concurrent {#sequence-concurrent} 119 119 120 - - **Type**: `boolean` 121 - - **Default**: `false` 122 - - **CLI**: `--sequence.concurrent`, `--sequence.concurrent=false` 120 + - **Type:** `boolean` 121 + - **Default:** `false` 122 + - **CLI:** `--sequence.concurrent`, `--sequence.concurrent=false` 123 123 124 124 If you want tests to run in parallel, you can enable it with this option, or CLI argument [`--sequence.concurrent`](/guide/cli). 125 125 ··· 129 129 130 130 ## sequence.seed <CRoot /> 131 131 132 - - **Type**: `number` 133 - - **Default**: `Date.now()` 134 - - **CLI**: `--sequence.seed=1000` 132 + - **Type:** `number` 133 + - **Default:** `Date.now()` 134 + - **CLI:** `--sequence.seed=1000` 135 135 136 136 Sets the randomization seed, if tests are running in random order. 137 137 138 138 ## sequence.hooks 139 139 140 - - **Type**: `'stack' | 'list' | 'parallel'` 141 - - **Default**: `'stack'` 142 - - **CLI**: `--sequence.hooks=<value>` 140 + - **Type:** `'stack' | 'list' | 'parallel'` 141 + - **Default:** `'stack'` 142 + - **CLI:** `--sequence.hooks=<value>` 143 143 144 144 Changes the order in which hooks are executed. 145 145 ··· 153 153 154 154 ## sequence.setupFiles {#sequence-setupfiles} 155 155 156 - - **Type**: `'list' | 'parallel'` 157 - - **Default**: `'parallel'` 158 - - **CLI**: `--sequence.setupFiles=<value>` 156 + - **Type:** `'list' | 'parallel'` 157 + - **Default:** `'parallel'` 158 + - **CLI:** `--sequence.setupFiles=<value>` 159 159 160 160 Changes the order in which setup files are executed. 161 161
+3 -3
docs/config/slowtestthreshold.md
··· 5 5 6 6 # slowTestThreshold <CRoot /> 7 7 8 - - **Type**: `number` 9 - - **Default**: `300` 10 - - **CLI**: `--slow-test-threshold=<number>`, `--slowTestThreshold=<number>` 8 + - **Type:** `number` 9 + - **Default:** `300` 10 + - **CLI:** `--slow-test-threshold=<number>`, `--slowTestThreshold=<number>` 11 11 12 12 The number of milliseconds after which a test or suite is considered slow and reported as such in the results.
+1 -1
docs/config/testnamepattern.md
··· 5 5 6 6 # testNamePattern <CRoot /> {#testnamepattern} 7 7 8 - - **Type** `string | RegExp` 8 + - **Type:** `string | RegExp` 9 9 - **CLI:** `-t <pattern>`, `--testNamePattern=<pattern>`, `--test-name-pattern=<pattern>` 10 10 11 11 Run tests with full names matching the pattern.
+22 -22
docs/config/typecheck.md
··· 9 9 10 10 ## typecheck.enabled {#typecheck-enabled} 11 11 12 - - **Type**: `boolean` 13 - - **Default**: `false` 14 - - **CLI**: `--typecheck`, `--typecheck.enabled` 12 + - **Type:** `boolean` 13 + - **Default:** `false` 14 + - **CLI:** `--typecheck`, `--typecheck.enabled` 15 15 16 16 Enable typechecking alongside your regular tests. 17 17 18 18 ## typecheck.only {#typecheck-only} 19 19 20 - - **Type**: `boolean` 21 - - **Default**: `false` 22 - - **CLI**: `--typecheck.only` 20 + - **Type:** `boolean` 21 + - **Default:** `false` 22 + - **CLI:** `--typecheck.only` 23 23 24 24 Run only typecheck tests, when typechecking is enabled. When using CLI, this option will automatically enable typechecking. 25 25 26 26 ## typecheck.checker 27 27 28 - - **Type**: `'tsc' | 'vue-tsc' | string` 29 - - **Default**: `tsc` 28 + - **Type:** `'tsc' | 'vue-tsc' | string` 29 + - **Default:** `tsc` 30 30 31 31 What tools to use for type checking. Vitest will spawn a process with certain parameters for easier parsing, depending on the type. Checker should implement the same output format as `tsc`. 32 32 ··· 39 39 40 40 ## typecheck.include 41 41 42 - - **Type**: `string[]` 43 - - **Default**: `['**/*.{test,spec}-d.?(c|m)[jt]s?(x)']` 42 + - **Type:** `string[]` 43 + - **Default:** `['**/*.{test,spec}-d.?(c|m)[jt]s?(x)']` 44 44 45 - Glob pattern for files that should be treated as test files 45 + Glob pattern for files that should be treated as test files. 46 46 47 47 ## typecheck.exclude 48 48 49 - - **Type**: `string[]` 50 - - **Default**: `['**/node_modules/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**']` 49 + - **Type:** `string[]` 50 + - **Default:** `['**/node_modules/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**']` 51 51 52 - Glob pattern for files that should not be treated as test files 52 + Glob pattern for files that should not be treated as test files. 53 53 54 54 ## typecheck.allowJs 55 55 56 - - **Type**: `boolean` 57 - - **Default**: `false` 56 + - **Type:** `boolean` 57 + - **Default:** `false` 58 58 59 59 Check JS files that have `@ts-check` comment. If you have it enabled in tsconfig, this will not overwrite it. 60 60 61 61 ## typecheck.ignoreSourceErrors 62 62 63 - - **Type**: `boolean` 64 - - **Default**: `false` 63 + - **Type:** `boolean` 64 + - **Default:** `false` 65 65 66 66 Do not fail, if Vitest found errors outside the test files. This will not show you non-test errors at all. 67 67 ··· 69 69 70 70 ## typecheck.tsconfig 71 71 72 - - **Type**: `string` 73 - - **Default**: _tries to find closest tsconfig.json_ 72 + - **Type:** `string` 73 + - **Default:** _tries to find closest tsconfig.json_ 74 74 75 75 Path to custom tsconfig, relative to the project root. 76 76 77 77 ## typecheck.spawnTimeout 78 78 79 - - **Type**: `number` 80 - - **Default**: `10_000` 79 + - **Type:** `number` 80 + - **Default:** `10_000` 81 81 82 82 Minimum time in milliseconds it takes to spawn the typechecker.
+4 -4
docs/guide/cli.md
··· 191 191 192 192 ### changed 193 193 194 - - **Type**: `boolean | string` 195 - - **Default**: false 194 + - **Type:** `boolean | string` 195 + - **Default:** false 196 196 197 197 Run tests only against changed files. If no value is provided, it will run tests against uncommitted changes (including staged and unstaged). 198 198 ··· 204 204 205 205 ### shard 206 206 207 - - **Type**: `string` 208 - - **Default**: disabled 207 + - **Type:** `string` 208 + - **Default:** disabled 209 209 210 210 Test suite shard to execute in a format of `<index>`/`<count>`, where 211 211
+1 -1
docs/api/advanced/vitest.md
··· 244 244 function standalone(): Promise<void> 245 245 ``` 246 246 247 - - **Alias**: `init` <Deprecated /> 247 + - **Alias:** `init` <Deprecated /> 248 248 249 249 Initialize reporters and the coverage provider. This method doesn't run any tests. If the `--watch` flag is provided, Vitest will still run changed tests even if this method was not called. 250 250
+1 -1
docs/config/browser/provider.md
··· 61 61 }) 62 62 ``` 63 63 64 - ## Custom Provider <Badge type="danger">advanced</Badge> 64 + ## Custom Provider <Badge type="danger">advanced</Badge> {#custom-provider} 65 65 66 66 ::: danger ADVANCED API 67 67 The custom provider API is highly experimental and can change between patches. If you just need to run tests in a browser, use the [`browser.instances`](/config/browser/instances) option instead.