npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wpe-tkpd/jsdom

v23.0.2

Published

A JavaScript implementation of many web standards

Readme

This is fork of jsdom. Originally forked because we need to not import/require canvas and we need to use custom decimal.js.

Tests

Running the tests

  1. Run nvm use to ensure you use the Node.js version expected by this package.
  2. Run pnpm i to install all dependencies.

To run all the tests: pnpm test

In the following sections, we'll give commands for running a subset of the tests. If you do that, instead of running the whole suite with pnpm test, then please run this command first:

Before running test subsets: pnpm pretest

Web platform feature tests

All tests for web platform features (as opposed to features of jsdom itself, such as the JSDOM() constructor) should be in web-platform-tests format. We have some infrastructure for running these directly against jsdom documents. So ideally, when contributing a bugfix or new feature, you can browse the web-platform-tests repository and find the test covering your work, and then just enable it in the to-run.yaml file. These tests are HTML files which use a special library called testharness.js to report their results.

However, the web-platform-tests project is not fully comprehensive. If you need to write your own test for a web platform feature, place it in our to-upstream directory. (It's so named because, over time, we hope to upstream these tests back to the web-platform-tests repository, so all browsers can benefit from them.) Note that you may need to create new directory structure, paralleling that of the main web-platform-tests repository.

To run all web-platform-tests: pnpm test-wpt

To run the to-upstream web-platform-tests: pnpm test-tuwpt

To run specific web-platform-tests already enabled via to-run.yaml: pnpm test-wpt --fgrep dom/events

To run specific to-upstream web-platform-tests: pnpmp test-tuwpt --fgrep domparsing

Also, to update web platform tests to their latest revision from the source repository: pnpm update-wpt. (This can take a long time, like 10 minutes.)

jsdom API tests

If you are testing something that can only be accomplished through the jsdom API, and not inside a normal web browser, you'll want to write a different kind of test. Such tests are written using Mocha and Chai.

To write such a test that, simply add a file in test/api/, following the surrounding conventions. Then, add it to the manifest at test/index.js.

To run all API tests: pnpm test-api

To run a specific API test: pnpm test-mocha test/api/from-file.js

Older tests

Although ideally you should not need to worry about this, there are some tests that are for legacy reasons not in the right format; they use Mocha, but really should be web platform tests. We're keeping them around for coverage until we can convert them. If you run pnpm test, you will get the full test suite, including such old tests.