Skip to content
H

Happy Dom

A JavaScript implementation of a web browser without its graphical user

by capricorn86Free

#1131in Developer Tools
0In stores

Description

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It gives code that expects a browser, such a…

Highlights

  • Browser DOM APIs in Node.js and Bun with no GUI
  • Custom elements and declarative shadow DOM
  • MutationObserver, TreeWalker and the Fetch API
  • Works with Vitest, Jest, Testing Library and major frameworks

Ratings & Reviews

No ratings yet

Be the first to rate Happy Dom.

People also visit

T

Testing Playground

Simple and complete DOM testing playground that encourage good testing practices

Developer Tools
Launch
B

Browser Run

Run code inside a browser from the command line

Developer Tools
Launch
D

Dev Browser

by Sawyer Hood - A browser-automation plugin/skill

AI Skills
Get
P

Playwright

Reliable browser automation and end-to-end testing

Developer Tools
Launch
P

Parallel DOM

Parallelize heavy DOM operations, workers concurrency

Developer Tools
Launch
P

Puppetry

Web testing solution for non-developers on top of Puppeteer and Jest

Developer Tools
Launch

Happy Dom FAQ

What is Happy DOM?

Happy DOM is a JavaScript implementation of a web browser's document model, without a graphical interface. It runs in Node.js and Bun so code and tests that expect a browser can run without one.

What is it used for?

Running browser-style code and tests without a browser window. The listed uses include manipulating the DOM, rendering Web Components and making fetch requests in a server-side environment.

How do I start?

Follow the getting started guide in the project documentation. There is a separate page for setting it up as a test environment.

Which test tools does it work with?

The project lists Vitest, Bun, Jest and Testing Library, and it works with React, Vue, Svelte, Angular and Google LitElement.

Is it free?

Yes. It is MIT licensed and the source is public on GitHub.

Does it open a browser window?

No. It is a browser without its graphical user interface, so it does not draw a window or page layout.

Who maintains it?

The licence names David Ortner as copyright holder from 2019 to the present. Contributions are taken through the contributing guide in the GitHub repository.

What are the best Happy Dom alternatives?

Popular alternatives to Happy Dom include Testing Playground, Browser Run and Playwright. See all Happy Dom alternatives

Developer Stuff

Badges