explaingit

robertknight/jsdom

Analysis updated 2026-07-18 · repo last pushed 2015-08-16

JavaScriptAudience · developerComplexity · 2/5DormantSetup · moderate

TLDR

jsdom simulates a web browser inside Node.js, letting you load HTML, run JavaScript against it, and test pages without opening a real browser.

Mindmap

mindmap
  root((repo))
    What it does
      Fake DOM in JavaScript
      Load HTML from URL or file
      Run JS against a page
    Tech stack
      JavaScript
      io.js
    Use cases
      Automated page testing
      Check links and buttons
      Simulate cookies and login
    Audience
      Developers
      QA engineers
    APIs
      jsdom.env easy mode
      jsdom.jsdom advanced mode

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Load a web page into a simulated browser environment and verify that links, buttons, or content exist.

USE CASE 2

Load an external library like jQuery into a page and run automated checks against it, without a real browser.

USE CASE 3

Test cookie-dependent behavior, like login state, by simulating cookies in the fake DOM.

USE CASE 4

Run external JavaScript files against a loaded page to confirm they behave as expected.

What is it built with?

JavaScriptio.js

How does it compare?

robertknight/jsdom3rd-eden/ircb.ioa15n/a15n
LanguageJavaScriptJavaScriptJavaScript
Last pushed2015-08-162016-11-162019-04-07
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity2/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires io.js rather than standard Node.js, per the README.

Copy-paste prompts

Prompt 1
Show me how to use jsdom.env from robertknight/jsdom to load a URL and count its links.
Prompt 2
Explain the difference between jsdom.env and jsdom.jsdom in robertknight/jsdom and when to use each.
Prompt 3
Help me write a test with robertknight/jsdom that checks a button exists and is clickable.
Prompt 4
Walk me through enabling external JavaScript execution safely in robertknight/jsdom for a trusted test page.

Frequently asked questions

What is jsdom?

jsdom simulates a web browser inside Node.js, letting you load HTML, run JavaScript against it, and test pages without opening a real browser.

What language is jsdom written in?

Mainly JavaScript. The stack also includes JavaScript, io.js.

Is jsdom actively maintained?

Dormant — no commits in 2+ years (last push 2015-08-16).

How hard is jsdom to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is jsdom for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.