Skip to content

JSDOM

Medium — good to knowTesting

ELI5 — The Vibe Check

JSDOM is the OG fake browser — a JavaScript implementation of web standards that runs in Node.js. Before Happy DOM came along, JSDOM was the only game in town for testing DOM interactions without a real browser. It's older, slower, but battle-tested and handles weird edge cases that newer alternatives miss.

Real Talk

A pure JavaScript implementation of the WHATWG DOM and HTML standards for use in Node.js. It emulates enough of a browser environment to test client-side code server-side, supporting document manipulation, event handling, and basic CSS. The default test environment for Jest.

When You'll Hear This

"Jest uses JSDOM by default to simulate the browser DOM in our unit tests." / "We still use JSDOM for legacy tests that depend on its specific quirks and behaviors."

Made with passive-aggressive love by manoga.digital. Powered by Claude.