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

react-qunit

v0.0.2

Published

A lightweight library for writing QUnit acceptance tests for React applications that run directly in the browser. It provides intuitive async test helpers (`visit`, `click`, `fillIn`, `waitFor`, etc.) and integrates with `qunit-dom` for DOM assertions. Th

Readme

React QUnit

A lightweight library for writing QUnit acceptance tests for React applications that run directly in the browser. It provides intuitive async test helpers (visit, click, fillIn, waitFor, etc.) and integrates with qunit-dom for DOM assertions. The pauseTest() function lets you pause a running test mid-flight and inspect the live UI in the browser, making it especially useful for prototyping and interactive debugging. You can then run resumeTest() from the developer console to continue test execution.

This library is based on https://github.com/emberjs/ember-qunit and is also useful for migrating from Ember to React, while keeping application level tests as they are.

Installation

pnpm install react-qunit qunit qunit-dom

Setup

// vite.config.qunit.js or vite.config.qunit.ts
import { mergeConfig } from 'vite';
import baseConfig from './vite.config';

export default mergeConfig(baseConfig, {
  root: './src/tests',
});

Add the following to scripts in package.json.

"dev:qunit": "vite --config vite.config.qunit.js",

Add a test helper file

// ./src/tests/test-helper.js
import 'react-qunit/setup-test-helper';
import { start } from 'react-qunit';

// Import main.jsx / main.tsx
import '../main.jsx';

// Import test files
import './qunit/basic-test.js';

start();

Add a QUnit harnessed index.html root file.

<!-- ./src/tests/index.html -->
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link
      rel="icon"
      href="/favicon.ico"
    />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>QUnit</title>
  </head>
  <body>
    <div id="qunit"></div>
    <div id="react-testing-container">
      <div id="react-testing">
        <div id="root"></div>
      </div>
    </div>

    <script
      type="module"
      src="./test-helper.js"
    ></script>
  </body>
</html>

Create a test module

// ./src/tests/qunit/basic-test.js
import { visit, click, waitFor } from 'react-qunit/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'react-qunit';

module('Basic module', function (hooks) {
  setupApplicationTest(hooks);

  test('Basic test', async function (assert) {
    await this.pauseTest();
    assert.ok(true, 'This test should pass');
  });
});

Running the app in qunit mode

Run pnpm dev:qunit for the harnessed QUnit version of the app.

Test helpers

A set of async helpers for interacting with and querying the DOM in tests — covering navigation, user input, waiting, and more.

See the API docs for the full reference.