jsdom vs Happy DOM
In 4,864 JavaScript/TypeScript projects set up for AI coding agents, jsdom is a dependency in 620 (12.7%) and Happy DOM in 122 (2.5%): jsdom is 5.1× as common. Among repos created in the last 90 days that use a testing tool, jsdom is in 17.9% and Happy DOM in 2.6%, against 27.3% and 5.4% of older ones. 36 projects list both, often a sign of a migration or of a monorepo with several apps.
Testing npm Updated Nov 17, 2026
Side by side
| jsdom | Happy DOM | |
|---|---|---|
| Agent projects that use it | 620 | 122 |
| Rank in testing | #4 | #7 |
| In new repos with a testing tool (last 90 days) | 17.9% | 2.6% |
| In older repos with one | 27.3% | 5.4% |
| Downloads, last 7 days | 158M | 35.1M |
| GitHub stars | 21.8K | 4,745 |
| Last push to its repo | Nov 13, 2026 | Nov 16, 2026 |
| License | MIT | MIT |
| Funding | — | — |
| Projects that list both | 36 | |
Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from npm.
By coding agent
| Projects set up for | JavaScript/TypeScript repos | jsdom | Happy DOM |
|---|---|---|---|
| Claude Code | 2,617 | 14.3% | 3.4% |
| GitHub Copilot | 2,350 | 13.8% | 2.9% |
| Cursor | 1,990 | 12.6% | 2.0% |
| Gemini CLI | 422 | 18.5% | 1.9% |
| OpenAI Codex | 409 | 17.4% | 1.7% |
| OpenCode | 304 | 14.1% | 5.6% |
| OpenClaw | 241 | 12.0% | 0% |
| Devin Desktop | 231 | 14.7% | 2.2% |
| Kiro | 125 | 16.8% | 0% |
| Roo-Code | 90 | 10.0% | 0% |
Share of the JavaScript/TypeScript repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.
jsdom
JavaScript implementation of web standards for testing DOM interactions.
Most often used with it:
| Vitest | 88.2% of its projects |
|---|---|
| Testing Library | 67.6% of its projects |
| Vite | 68.5% of its projects |
| TypeScript | 89.4% of its projects |
| React | 68.1% of its projects |
npm install jsdom
Happy DOM
Lightweight DOM implementation for server-side rendering and testing without a browser.
Most often used with it:
| Vitest | 90.2% of its projects |
|---|---|
| Vite | 69.7% of its projects |
| Testing Library | 55.7% of its projects |
| Playwright (JavaScript) | 58.2% of its projects |
| Zod | 60.7% of its projects |
npm install happy-dom
More matchups
How we count
Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.