Vitest 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