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

gulp-qunit-puppeteer

v1.1.1

Published

Runs QUnit tests with the specified JS dependencies in a Puppeteer instance (using headless Chromium) and outputs the results as JUnit XML.

Readme

gulp-qunit-puppeteer

Runs QUnit tests with the specified JS dependencies in a Puppeteer instance (using headless Chromium) and outputs the results as JUnit XML.

Install

npm install --save-dev gulp-qunit-puppeteer

Require

const test = require("gulp-qunit-puppeteer");

Usage

const gulp = require("gulp");
const concat = require("gulp-concat-util");
const gulpIf = require("gulp-if");
const fail = require("gulp-fail");
const fs = require("fs");
const test = require("gulp-qunit-puppeteer");

gulp.task("default", () => {
    return gulp.src("./test/*.js")                                // specify test suites here
        .pipe(test({                                              // call the test runner here
            globalDependencies: ["./test-namespaces.js"],
            dependencies: { "tests3": ["./test-namespaces-2.js"] },
            htmlBody: "<span id='my-elem'></span>"
        }))
        .pipe(concat("TestResults.xml", {                         // you can combine the outputted test results into one using gulp-concat-util
            process(source, filePath) {
                return source.trim().replace("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuites>", "").replace("</testsuites>", "");
            }
        }))
        .pipe(concat.header("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuites>"))
        .pipe(concat.footer("</testsuites>"))
        .pipe(gulp.dest("./"))                                    // write the output file here
        .pipe(gulpIf(function (file) {                            // use gulp-if and gulp-fail to fail the gulp task if any tests failed
            const contents = fs.readFileSync(file.path);
            return contents.includes("<failure message");
        }, fail()));
});

Options

globalDependencies

Type: Array of JS file paths

Used to specify a set of JS file dependencies that are required by all selected test files.

dependencies

Type: Array of JS file paths or associative array of test suite names (test file name minus .js extension) and an array of JS file paths

When just an array of JS file paths, works the same as globalDependencies. When an associative array, allows dependencies to be set for each individual test suite.

transformFileName

Type: function with suiteName as its only parameter

Allows the output XML filename to be transformed based on the test suite name. The .xml extension will be added automatically.

htmlBody

Type: string of HTML or associative array of test suite names and a string of HTML

HTML content to render to the autogenerated HTML page's body.

consolePassthrough

Type: boolean

Decides whether to passthrough console output from the test run to the Node console. Default: false

debug

Type: boolean or object with delay property

Decides whether to launch Puppeteer in non-headless mode, with DevTools open, enabling debugging with the debugger; statement. Default: false

Passing as an object with a delay property set to a number of milliseconds will instigate a delay before Puppeteer loads the page. This is to give the Chromium browser window time to open before starting the tests. If the test code executes before the window is visible, execution may not pause on any breakpoints.