vitest-5-0-0-6-b
Claude Code's read-only tools, web search on, ludion sync off
Question
Which browser providers can Vitest browser mode use?
Answer key
- A correct answer says
- The WebdriverIO provider was not removed. @vitest/browser-webdriverio (import { webdriverio }, used as test.browser.provider: webdriverio()) moved out of the core repo and is now community maintained in the vitest-community organization; version 5.0.0 is published and works with Vitest 5.
- The stale answer
- Use @vitest/browser-webdriverio as a browser mode provider.
Answer
Vitest browser mode has three built-in providers:
- **Playwright** (`@vitest/browser-playwright`) runs tests in Chromium, Firefox and WebKit. It's the recommended choice for CI and headless runs.
- **WebdriverIO** (`@vitest/browser-webdriverio`) drives real browsers like Chrome, Firefox, Edge and Safari over the WebDriver protocol.
- **Preview** (`@vitest/browser-preview`) opens tests in your normal local browser. It's only for local development: it can't run headless and only simulates user events, so it isn't suited to CI.
Since Vitest 4, you set the provider as a function in your config, for example `browser: { provider: playwright(), instances: [{ browser: 'chromium' }] }`. Older versions used a string like `provider: 'playwright'`. You can also write your own provider through the provider API. I answered from memory without checking the current docs, so it's worth confirming against the docs for your Vitest version.Grade
wrong
The judge's reason: It presents WebdriverIO as a built-in core provider and never mentions that it moved to community maintenance in the vitest-community organization, which is the stale framing.
Session log
Agent
Vitest browser mode has three built-in providers: - **Playwright** (`@vitest/browser-playwright`) runs tests in Chromium, Firefox and WebKit. It's the recommended choice for CI and headless runs. - **WebdriverIO** (`@vitest/browser-webdriverio`) drives real browsers like Chrome, Firefox, Edge and Safari over the WebDriver protocol. - **Preview** (`@vitest/browser-preview`) opens tests in your normal local browser. It's only for local development: it can't run headless and only simulates user events, so it isn't suited to CI. Since Vitest 4, you set the provider as a function in your config, for example `browser: { provider: playwright(), instances: [{ browser: 'chromium' }] }`. Older versions used a string like `provider: 'playwright'`. You can also write your own provider through the provider API. I answered from memory without checking the current docs, so it's worth confirming against the docs for your Vitest version.