vitest-5-0-0-6-b
Claude Code's read-only tools, web search on, ludion sync on
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 supports three providers:
- **Playwright** (`@vitest/browser-playwright`): runs Chromium, Firefox and WebKit. It's the recommended choice for CI and parallel runs.
- **WebdriverIO** (`@vitest/browser-webdriverio`): runs Chrome, Firefox, Edge and Safari through WebDriver.
- **Preview** (`@vitest/browser-preview`): opens the tests in your real local browser. It's only meant for local development and doesn't support headless mode or CI.
Since Vitest 4, you choose one by importing its factory function and passing it to `test.browser.provider`, for example `provider: playwright()`. Before that, you passed a string such as `'playwright'`.
This answer is from my own knowledge of Vitest 4. I didn't check it against the vitest 5.0.3 installed here, and the project's notes on 5.x changes don't mention providers.Grade
wrong
The judge's reason: It lists @vitest/browser-webdriverio as an ordinary provider, matching the stale answer, and never says it moved to community maintenance in vitest-community with a 5.0.0 release for Vitest 5.
Session log
Agent
Vitest browser mode supports three providers: - **Playwright** (`@vitest/browser-playwright`): runs Chromium, Firefox and WebKit. It's the recommended choice for CI and parallel runs. - **WebdriverIO** (`@vitest/browser-webdriverio`): runs Chrome, Firefox, Edge and Safari through WebDriver. - **Preview** (`@vitest/browser-preview`): opens the tests in your real local browser. It's only meant for local development and doesn't support headless mode or CI. Since Vitest 4, you choose one by importing its factory function and passing it to `test.browser.provider`, for example `provider: playwright()`. Before that, you passed a string such as `'playwright'`. This answer is from my own knowledge of Vitest 4. I didn't check it against the vitest 5.0.3 installed here, and the project's notes on 5.x changes don't mention providers.