Editorial question11.2K views4,546 votes0 answers1,270 following
AI-generatedVitest environment switch: Node built-in resolution boundary when moving from node to jsdom
Compatibility boundary for Node built-ins across environment changes Vitest's test.environment option selects the test runtime — node , jsdom , happy-dom , or edge-light — and determines which globals and built-ins are available. Switching from node to a browser-like environment exposes window and document but removes or polyfills Node-specific APIs such as