happy-dom

Installation
SKILL.md

Happy DOM

Overview

Happy DOM is a JavaScript DOM implementation for Node.js — 3-10x faster than jsdom. It provides window, document, HTMLElement, and 1000+ Web APIs without launching a browser. Use it as the test environment for Vitest or Jest when testing UI components, or for server-side DOM manipulation (email templates, HTML generation, scraping).

When to Use

  • Test environment for React/Vue/Svelte component tests (faster than jsdom)
  • Vitest setup — Happy DOM is the recommended environment
  • Server-side HTML generation or manipulation
  • Parsing and extracting data from HTML strings
  • Email template rendering on the server

Instructions

Vitest Integration

Related skills
Installs
2
GitHub Stars
47
First Seen
Mar 13, 2026