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
-`interrupted`: testwasinterrupedby [`vitest.cancelCurrentRun`](/advanced/api/vitest#cancelcurrentrun) callor`Ctrl+C`waspressedintheterminal (notethatit's still possible to have failed tests in this case)
142
+
-`interrupted`: testwasinterruptedby [`vitest.cancelCurrentRun`](/advanced/api/vitest#cancelcurrentrun) callor`Ctrl+C`waspressedintheterminal (notethatit's still possible to have failed tests in this case)
143
143
144
144
IfVitestdidn't find any test files to run, this event will be invoked with empty arrays of modules and errors, and the state will depend on the value of [`config.passWithNoTests`](/config/#passwithnotests).
Incasetheprojectdoesn't exist, this method will return the root project - make sure to check the names again if the project you are looking for is the one returned.
@@ -297,7 +297,7 @@ As of Vitest 3, this method uses a cache to check if the file is a test. To make
297
297
function clearSpecificationsCache(moduleId?: string): void
298
298
```
299
299
300
-
Vitestautomaticallycachestestspecificationsforeachfilewhen [`globTestSpecifications`](#globtestspecifications) or [`runTestSpecifications`](#runtestspecifications) iscalled. Thismethodclearsthecacheforthegivenfileorthewholecachealltogetherdependingonthefirstargument.
300
+
Vitestautomaticallycachestestspecificationsforeachfilewhen [`globTestSpecifications`](#globtestspecifications) or [`runTestSpecifications`](#runtestspecifications) iscalled. Thismethodclearsthecacheforthegivenfileorthewholecachealtogetherdependingonthefirstargument.
301
301
302
302
## runTestSpecifications
303
303
@@ -452,7 +452,7 @@ function exit(force = false): Promise<void>
Copy file name to clipboardExpand all lines: docs/advanced/guide/tests.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ finally {
71
71
}
72
72
```
73
73
74
-
If you intend to keep the `Vitest` instance, make sure to at least call [`init`](/advanced/api/vitest#init). This will initialise reporters and the coverage provider, but won't run any tests. It is also recommended to enable the `watch` mode even if you don't intend to use the Vitest watcher, but want to keep the instance running. Vitest relies on this flag for some of its features to work correctly in a continous process.
74
+
If you intend to keep the `Vitest` instance, make sure to at least call [`init`](/advanced/api/vitest#init). This will initialise reporters and the coverage provider, but won't run any tests. It is also recommended to enable the `watch` mode even if you don't intend to use the Vitest watcher, but want to keep the instance running. Vitest relies on this flag for some of its features to work correctly in a continuous process.
75
75
76
76
After reporters are initialised, use [`runTestSpecifications`](/advanced/api/vitest#runtestspecifications) or [`rerunTestSpecifications`](/advanced/api/vitest#reruntestspecifications) to run tests if manual run is required:
The example above shows a potential usecase if you disable the default watcher behaviour. By default, Vitest already reruns tests if files change.
91
+
The example above shows a potential use-case if you disable the default watcher behaviour. By default, Vitest already reruns tests if files change.
92
92
93
93
Also note that `getModuleSpecifications` will not resolve test files unless they were already processed by `globTestSpecifications`. If the file was just created, use `project.matchesGlobPattern` instead:
Copy file name to clipboardExpand all lines: docs/guide/browser/multiple-setups.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Since Vitest 3, you can specify several different browser setups using the new [`browser.instances`](/guide/browser/config#browser-instances) option.
4
4
5
-
The main advatage of using the `browser.instances` over the [workspace](/guide/workspace) is improved caching. Every project will use the same Vite server meaning the file transform and [dependency pre-bundling](https://vite.dev/guide/dep-pre-bundling.html) has to happen only once.
5
+
The main advantage of using the `browser.instances` over the [workspace](/guide/workspace) is improved caching. Every project will use the same Vite server meaning the file transform and [dependency pre-bundling](https://vite.dev/guide/dep-pre-bundling.html) has to happen only once.
6
6
7
7
## Several Browsers
8
8
@@ -128,7 +128,7 @@ start tests with --browser=name or --project=name flag. › - Use arrow-keys. Re
128
128
firefox
129
129
```
130
130
131
-
If you have several non-headless projects in CI (i.e. the `headless: false` is set manually in the config and not overriden in CI env), Vitest will fail the run and won't start any tests.
131
+
If you have several non-headless projects in CI (i.e. the `headless: false` is set manually in the config and not overridden in CI env), Vitest will fail the run and won't start any tests.
132
132
133
133
The ability to run tests in headless mode is not affected by this. You can still run all instances in parallel as long as they don't have `headless: false`.
Copy file name to clipboardExpand all lines: docs/guide/browser/playwright.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Note that the context is created for every _test file_, not every _test_ like in
74
74
:::
75
75
76
76
::: warning
77
-
Vitest awlays sets `ignoreHTTPSErrors` to `true` in case your server is served via HTTPS and `serviceWorkers` to `'allow'` to support module mocking via [MSW](https://mswjs.io).
77
+
Vitest always sets `ignoreHTTPSErrors` to `true` in case your server is served via HTTPS and `serviceWorkers` to `'allow'` to support module mocking via [MSW](https://mswjs.io).
78
78
79
79
It is also recommended to use [`test.browser.viewport`](/guide/browser/config#browser-headless) instead of specifying it here as it will be lost when tests are running in headless mode.
Copy file name to clipboardExpand all lines: packages/vitest/src/node/workspace/resolveWorkspace.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ export async function resolveBrowserWorkspace(
216
216
217
217
if(project.config.browser.providerOptions){
218
218
vitest.logger.warn(
219
-
withLabel('yellow','Vitest',`"providerOptions"${originalName ? ` in "${originalName}" project` : ''} is ignored because it's overriden by the configs. To hide this warning, remove the "providerOptions" property from the browser configuration.`),
219
+
withLabel('yellow','Vitest',`"providerOptions"${originalName ? ` in "${originalName}" project` : ''} is ignored because it's overridden by the configs. To hide this warning, remove the "providerOptions" property from the browser configuration.`),
0 commit comments