🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@vitest/browser-playwright

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/browser-playwright

Browser running for Vitest using playwright

latest
Source
npmnpm
Version
4.1.5
Version published
Weekly downloads
3.3M
-4.91%
Maintainers
5
Weekly downloads
 
Created
Source

@vitest/browser-playwright

NPM version

Run your Vitest browser tests using playwright API. Note that Vitest does not use playwright as a test runner, but only as a browser provider.

We recommend using this package if you are already using playwright in your project or if you do not have any E2E tests yet.

Installation

Install the package with your favorite package manager:

npm install -D @vitest/browser-playwright
# or
yarn add -D @vitest/browser-playwright
# or
pnpm add -D @vitest/browser-playwright

Then specify it in the browser.provider field of your Vitest configuration:

// vitest.config.ts
import { defineConfig } from 'vitest/config'
import { playwright } from '@vitest/browser-playwright'

export default defineConfig({
  test: {
    browser: {
      provider: playwright({
        // ...custom playwright options
      }),
      instances: [
        { browser: 'chromium' },
      ],
    },
  },
})

Then run Vitest in the browser mode:

npx vitest --browser

GitHub | Documentation

Keywords

browser

FAQs

Package last updated on 21 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts