JSDOM
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."
Related Terms
Happy DOM
Happy DOM is a fake browser environment that lives in Node.js. It's like JSDOM but faster and happier (hence the name). When you need to test components th
Jest
Jest is the most popular JavaScript testing framework.
Playwright Test
Playwright Test is Microsoft's end-to-end testing framework that controls real browsers like a puppet master. It can test in Chrome, Firefox, and Safari si