new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vitest · Guide · all subjects

browser/setup

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Browser mode setup with vitest init command

Browser mode can be set up easily using the 'vitest init browser' command, which installs required dependencies and creates browser configuration. The command works with npm, yarn, pnpm, and bun package managers.

Browser providers: preview, playwright, webdriverio

Vitest requires a browser provider to be defined when using browser mode. Three providers are available: 'preview' (for development preview only), 'playwright' (recommended for CI and local testing, supports parallel execution), and 'webdriverio' (for testing locally using WebDriver protocol).

Preview provider not suitable for CI

The preview provider should not be used for CI testing. It relies on simulating events instead of using Chrome DevTools Protocol. For CI environments, either Playwright or WebdriverIO must be installed.

Install Playwright for browser testing

To install Vitest with Playwright provider, run 'npm install -D vitest @vitest/browser-playwright' for npm, 'yarn add -D vitest @vitest/browser-playwright' for yarn, 'pnpm add -D vitest @vitest/browser-playwright' for pnpm, or 'bun add -D vitest @vitest/browser-playwright' for bun.

Install WebdriverIO for browser testing

To install Vitest with WebdriverIO provider, run 'npm install -D vitest @vitest/browser-webdriverio' for npm, 'yarn add -D vitest @vitest/browser-webdriverio' for yarn, 'pnpm add -D vitest @vitest/browser-webdriverio' for pnpm, or 'bun add -D vitest @vitest/browser-webdriverio' for bun.

Give your agent this brain