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

hermione-run-tests

v1.0.0

Published

Run tests for each stub api consistently

Downloads

29

Readme

hermione-run-tests

Run tests for each stub api consistently

Install

npm install --save-dev hermione-run-tests

Usage

for example you have a .hermione.conf.js like this:

module.exports = {
    baseUrl: 'http://localhost',
    gridUrl: 'http://localhost:4444/wd/hub',

    browsers: {
        'chrome': {
            desiredCapabilities: {
                browserName: 'chrome'
            }
        }
    },

    plugins: {
        'html-reporter/hermione': {
            path: 'hermione/screens'
        }
    },
    screenshotsDir: 'hermione/screens/images'
};

and you have two tests /tests/test1.js

describe('test1', function() {
    it('rub to dollar', function() {
        return this.browser
            .url('/')
            .waitForVisible('.selector', 3000)
            .assertView('converter is visible', '.selector')
    });
});

and /tests/test2.js

describe('test2', function() {
    it('euro to dollar', function() {
        return this.browser
            .url('/')
            .waitForVisible('.selector', 3000)
            .assertView('converter is visible', '.selector')
    });
});

and let's imagine that each test needs its own API: /api-stub/stub1.json

{
	"stub": {
		"payload": "1"
	}
}

/api-stub/stub2.json

{
	"stub": {
		"payload": "2"
	}
}

you want to run every test for your API-stub. just create the following file: autorun-tests.js

const runTests = require('hermione-run-tests');
const Hermione = require('hermione');
const jsonServer = require('json-server');

const tests = [
    {pathToApiStub: './api-stubs/stub1.json', pathToTests: 'hermione/tests/test1.js', updateRefs: false},
    {pathToApiStub: './api-stubs/stub2.json', pathToTests: 'hermione/tests/test2.js', updateRefs: false}
];

runTests(tests, Hermione, jsonServer);

and by running the command node autorun-tests.js your tests will run alternately:

alt demonstration image

Arguments

 * @param {
 *      {
 *          pathToApiStub: string,
 *          countRetry?: number,
 *          testPaths: string | string[],
 *          hermioneOptions?: {
 *              browsers, sets, grep, updateRefs: boolean, reporters, inspectMode
 *          }
 *      }[]
 * } tests - Array with tests.
 * @param {object} Hermione - your Hermione class(from package 'hermione')
 * @param {object} jsonServer - your jsonServer class(from package 'json-server')
 * @param {
 *     {
 *         port?: number,
 *         hermioneConfigPath?: string,
 *         hermioneOptions?: {
 *              browsers, sets, grep, updateRefs: boolean, reporters, inspectMode
 *         },
 *         countRetry?: number
 *     }
 * } options?