Browser running for Vitest using webdriverio
- Types
- ESM
- License
- MIT
- Install Size
- 36.5 kB
- Vulns
- Published
Get started
npm install @vitest/browser-webdriveriopnpm add @vitest/browser-webdriverioyarn add @vitest/browser-webdriveriobun add @vitest/browser-webdriveriodeno add npm:@vitest/browser-webdriveriovlt install @vitest/browser-webdriveriovp add @vitest/browser-webdriverionub add @vitest/browser-webdriverioni @vitest/browser-webdriverioupm add @vitest/browser-webdriverio@vitest/browser-webdriverio
Run your Vitest browser tests using the webdriverio API. Note that Vitest does not use webdriverio as a test runner, but only as a browser provider.
We recommend using this package if you are already using webdriverio in your project.
This is a community-maintained provider. It lives in the
vitest-communityorganization and is released independently from the core Vitest packages. Issues and pull requests for the webdriverio provider should be opened here, not on the mainvitest-dev/vitestrepository.
Installation
Install the package with your favorite package manager:
npm install -D @vitest/browser-webdriverio
# or
yarn add -D @vitest/browser-webdriverio
# or
pnpm add -D @vitest/browser-webdriverio
Then specify it in the browser.provider field of your Vitest configuration:
// vitest.config.ts
import { webdriverio } from '@vitest/browser-webdriverio'
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
browser: {
provider: webdriverio({
// ...custom webdriverio options
}),
instances: [
{ browser: 'chrome' },
],
},
},
})
Then run Vitest in the browser mode:
npx vitest --browser
Contributing
See CONTRIBUTING.md for local development, the build setup, the test suite, and the release process.