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

sauce-test-runner

v0.2.0

Published

Node module for running tests using Sauce Labs. Supports QUnit, Jasmine and Mocha tests

Readme

sauce-test-runner

Build Status

Node module for running tests using SauceLabs automated tests feature to run on several different browsers

Install

npm install --save-dev sauce-test-runner

Usages

Simple Usage with gulp

const saucelabs = require('gulp-saucelabs');
const connect   = require('gulp-connect');
 
// Saucelabs 
gulp.task('saucelabs', () => {
    const config = {
      urls: ['http://localhost:3000/tests/qunit/index.html'],
      testname: 'My test',
      framework: 'qunit',
      browsers: [
          {
              browserName: "MicrosoftEdge",
              platform: "Windows 10",
              version: "latest"
          }
      ],
      onTestSuiteComplete: (status) => {
          if (status) {
              console.log('All tests passed!');
          }
      };
    }
 
    return saucelabs(config);
});
 
// Start local http server 
gulp.task('connect', () => {
    connect.server({ port: 3000, root: './' });
});
 
// Close down the http server 
gulp.task('disconnect', () => {
    connect.serverClose();
});
 
gulp.task('test-saucelabs', ['connect', 'saucelabs'], () => gulp.start('disconnect'));

Options

Example:

const config = {
    username: 'foo-bar',
    key: 'xxxx-xxxx-xxxx-xxxx-xxxx',
    urls: ['http://localhost:3000/tests/index.html'],
    testname: 'My test',
    framework: 'qunit',
    logger: {
        log: console.log,
        debug: console.log,
    },
    debug: false,
    browsers: [
        {
            browserName: "MicrosoftEdge",
            platform: "Windows 10",
            version: "latest"
        },
        {
            browserName: "internet explorer",
            version: "11",
            platform: "Windows 8.1"
        },
        {
            browserName: "internet explorer",
            version: "10",
            platform: "Windows 8"
        }
    ],
    onTestSuiteComplete: (status) => {
        if (status) {
            console.log('All tests passed!');
        }
    }
    ...
}

username

Username to SauceLabs. If not provided, uses the value of SAUCE_USERNAME environment variable. Optional

key

Accesskey for SauceLabs. If not provided, uses the value of SAUCE_ACCESS_KEY environment variable. Optional

build

The build number for this test. Optional

urls

An array or URLs that will be loaded in the browsers, one after another. Required

framework

Which framework to test. Options: qunit, jasmine, mocha, custom. Required

testname

name of the test, displayed on the SauceLabs dashboard. Optional

tags

An array of strings, to be added as tags to the test on Sauce Labs. Optional

tunneled

Defaults to true; Won't launch a Sauce Connect tunnel if set to false. Optional

tunnelArgs

Array of optional arguments to be passed to the Sauce Connect tunnel. example: ['--debug', '--direct-domains', 'google.com']. See here for further documentation.

sauceConfig

Map of extra parameters to be passed to sauce labs. example: {'video-upload-on-pass': false, 'idle-timeout': 60}. See here for further documentation.

pollInterval

Number of milliseconds between each retry to see if a test is completed or not (default: 2000). Optional

statusCheckAttempts

Number of times to attempt to see if a test is completed or not (default: 90). Effectively, your tests have statusCheckAttempts * pollInterval seconds to complete (Thus, 180s by default). Set to -1 to try forever. Optional

throttled

Maximum number of unit test pages which will be sent to Sauce Labs concurrently. Exceeding your SauceLabs' allowed concurrency can lead to test failures if you have a lot of unit test pages. Optional

maxDuration

Maximum duration of a test, this is actually a Selenium Capability. SauceLabs defaults to 180 seconds for js unit tests. Optional

browsers

An array of objects representing the various browsers on which this test should run. Optional

onTestComplete

A callback that is called every time a unit test for a page is complete. Runs per page, per browser configuration. Receives two arguments (result, callback). result is the javascript object exposed to SauceLabs as the results of the test. callback must be called, node-style (having arguments err, result where result is a true/false boolean which sets the test result reported to the command line). Optional

onException

A callback that is called when the tunnel does not close properly and we had to cancel the promise waiting for the tunnel to close.

onTestSuiteComplete

A callback that is called when all tests have run and the tunnel has been closed down. The callback receives one argument (boolean) which is true if all tests passed, otherwise false.

logger

Logger functions, used to print the test output. The logger object needs to define two methods: log and debug which take a sequence of strings as arguments. Defaults to console.log.

debug

Specifies if the module should invoke logger.debug to print saucelabs tunnel info messages.

maxRetries

Specifies how many times the timed out tests should be retried (default: 0). Optional

public

The job visibility level. Defaults to 'team'. Optional

Contribution

Forked from https://github.com/axemclion/grunt-saucelabs

Changelog

###0.1.4 Added callback and timeout for when the tunnel does not stop

###0.1.3 Removed YUI support