Skip to content
masterclass Buddy

Vitest · Pipe

test.environment

Vitest uses node by default. Choose jsdom or happy-dom for browser-like tests, or edge-runtime for edge-function tests.

Last updated

Syntax

test: { environment: 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime' | string }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • environmentOptions
  • @vitest-environment
  • Browser Mode
  • test projects
  • server.deps.inline
  • Environment
  • builtinEnvironments
  • populateGlobal

Source: environment | Config | Vitest. Checked 2026-11-03.