[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(browser): remove mentions of old browser/providers/* (#8515)

authored by

Vladimir and committed by
GitHub
(Aug 31, 2025, 12:45 PM +0200) bbb3514f 2308cbf1

+1 -79
-16
docs/guide/browser/commands.md
··· 148 148 } 149 149 ``` 150 150 151 - ::: tip 152 - If you are using TypeScript, don't forget to reference `@vitest/browser/providers/playwright` in your [setup file](/config/#setupfile) or a [config file](/config/) to get autocompletion in the config and in `userEvent` and `page` options: 153 - 154 - ```ts 155 - /// <reference types="@vitest/browser/providers/playwright" /> 156 - ``` 157 - ::: 158 - 159 151 ### Custom `webdriverio` commands 160 152 161 153 Vitest exposes some `webdriverio` specific properties on the context object. ··· 163 155 - `browser` is the `WebdriverIO.Browser` API. 164 156 165 157 Vitest automatically switches the `webdriver` context to the test iframe by calling `browser.switchFrame` before the command is called, so `$` and `$$` methods refer to the elements inside the iframe, not in the orchestrator, but non-webdriver APIs will still refer to the parent frame context. 166 - 167 - ::: tip 168 - If you are using TypeScript, don't forget to reference `@vitest/browser/providers/webdriverio` in your [setup file](/config/#setupfile) or a [config file](/config/) to get autocompletion: 169 - 170 - ```ts 171 - /// <reference types="@vitest/browser/providers/webdriverio" /> 172 - ``` 173 - :::
-11
docs/guide/browser/config.md
··· 455 455 resolveDiffPath: ({ arg, attachmentsDir, browserName, ext, root, testFileName }) => 456 456 `${root}/${attachmentsDir}/screenshot-diffs/${testFileName}/${arg}-${browserName}${ext}` 457 457 ``` 458 - 459 - ::: tip 460 - To have a better type safety when using built-in providers, you should reference 461 - one of these types (for provider that you are using) in your 462 - [config file](/config/): 463 - 464 - ```ts 465 - /// <reference types="@vitest/browser/providers/playwright" /> 466 - /// <reference types="@vitest/browser/providers/webdriverio" /> 467 - ``` 468 - :::
-42
docs/guide/browser/index.md
··· 293 293 - `webkit` 294 294 - `chromium` 295 295 296 - ## TypeScript 297 - 298 - By default, TypeScript doesn't recognize providers options and extra `expect` properties. If you don't use any providers, make sure the `@vitest/browser/matchers` is referenced somewhere in your tests, [setup file](/config/#setupfiles) or a [config file](/config/) to pick up the extra `expect` definitions. If you are using custom providers, make sure to add `@vitest/browser/providers/playwright` or `@vitest/browser/providers/webdriverio` to the same file so TypeScript can pick up definitions for custom options: 299 - 300 - ::: code-group 301 - ```ts [default] 302 - /// <reference types="@vitest/browser/matchers" /> 303 - ``` 304 - ```ts [playwright] 305 - /// <reference types="@vitest/browser/providers/playwright" /> 306 - ``` 307 - ```ts [webdriverio] 308 - /// <reference types="@vitest/browser/providers/webdriverio" /> 309 - ``` 310 - ::: 311 - 312 - Alternatively, you can also add them to `compilerOptions.types` field in your `tsconfig.json` file. Note that specifying anything in this field will disable [auto loading](https://www.typescriptlang.org/tsconfig/#types) of `@types/*` packages. 313 - 314 - ::: code-group 315 - ```json [default] 316 - { 317 - "compilerOptions": { 318 - "types": ["@vitest/browser/matchers"] 319 - } 320 - } 321 - ``` 322 - ```json [playwright] 323 - { 324 - "compilerOptions": { 325 - "types": ["@vitest/browser/providers/playwright"] 326 - } 327 - } 328 - ``` 329 - ```json [webdriverio] 330 - { 331 - "compilerOptions": { 332 - "types": ["@vitest/browser/providers/webdriverio"] 333 - } 334 - } 335 - ``` 336 - ::: 337 - 338 296 ## Browser Compatibility 339 297 340 298 Vitest uses [Vite dev server](https://vitejs.dev/guide/#browser-support) to run your tests, so we only support features specified in the [`esbuild.target`](https://vitejs.dev/config/shared-options.html#esbuild) option (`esnext` by default).
+1 -10
docs/guide/browser/interactivity-api.md
··· 12 12 await userEvent.click(document.querySelector('.button')) 13 13 ``` 14 14 15 - Almost every `userEvent` method inherits its provider options. To see all available options in your IDE, add `webdriver` or `playwright` types (depending on your provider) to your [setup file](/config/#setupfile) or a [config file](/config/) (depending on what is in `included` in your `tsconfig.json`): 16 - 17 - ::: code-group 18 - ```ts [playwright] 19 - /// <reference types="@vitest/browser/providers/playwright" /> 20 - ``` 21 - ```ts [webdriverio] 22 - /// <reference types="@vitest/browser/providers/webdriverio" /> 23 - ``` 24 - ::: 15 + Almost every `userEvent` method inherits its provider options. 25 16 26 17 ## userEvent.setup 27 18