[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: document how to enable new Chromium headless mode in Playwright provider (#9974)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>

authored by

Copilot
copilot-swe-agent[bot]
sheremet-va
and committed by
GitHub
(Mar 26, 2026, 3:47 PM +0100) e92f2878 fc6f482f

+25
+25
docs/config/browser/playwright.md
··· 67 67 Note that Vitest will push debugging flags to `launch.args` if [`--inspect`](/guide/cli#inspect) is enabled. 68 68 ::: 69 69 70 + ::: tip Enabling new Chromium headless mode 71 + Playwright supports a [new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode) for Chromium that uses the real Chrome browser instead of the dedicated headless shell. This provides more authentic, reliable test execution and removes the need to install a separate headless Chromium build. 72 + 73 + To opt in, set `channel` to `'chromium'` in `launchOptions`: 74 + 75 + ```ts [vitest.config.ts] 76 + import { playwright } from '@vitest/browser-playwright' 77 + import { defineConfig } from 'vitest/config' 78 + 79 + export default defineConfig({ 80 + test: { 81 + browser: { 82 + headless: true, 83 + provider: playwright({ 84 + launchOptions: { 85 + channel: 'chromium', 86 + }, 87 + }), 88 + instances: [{ browser: 'chromium' }], 89 + }, 90 + }, 91 + }) 92 + ``` 93 + ::: 94 + 70 95 ## connectOptions 71 96 72 97 These options are directly passed down to `playwright[browser].connect` command. You can read more about the command and available arguments in the [Playwright documentation](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).