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

testcafe-reporter-custom

v1.2.1

Published

TestCafe reporter that allows you to provide your own logic

Readme

testcafe-reporter-custom

This is the custom reporter plugin for TestCafe.

Install

npm install testcafe-reporter-custom

Usage

When you run tests from the command line, specify the reporter name by using the --reporter option:

testcafe chrome 'path/to/test/file.js' --reporter custom

When you use API, pass the reporter name to the reporter() method:

testCafe
    .createRunner()
    .src('path/to/test/file.js')
    .browsers('chrome')
    .reporter('custom') // <-
    .run();

After that you can define your custom logic in reporter/index.js file.
It can be defined as an object or factory function.

For example:

module.exports = function () {
    return {
        async reportTaskStart(/* startTime, userAgents, testCount */) {
            throw new Error('Not implemented');
        },

        async reportFixtureStart(/* name, path, meta */) {
            throw new Error('Not implemented');
        },

        async reportTestStart(/* name, meta */) {
            // NOTE: This method is optional.
        },

        async reportTestDone(/* name, testRunInfo, meta */) {
            throw new Error('Not implemented');
        },

        async reportTaskDone(/* endTime, passed, warnings, result */) {
            throw new Error('Not implemented');
        }
    };
}

API is completely the same as for regular reporter.

Configuration

Reporter can be configured using reporter.config.js file, which should be placed in a project root folder.

module.exports = {
    path: 'reporter/main.js'
};

Possible options are presented in the table below.

| Option | Default Value | Description | | ------------ | ------------------------ | --------------------------------------------------------------------------------------------------------------------- | | path | 'reporter/index.js' | Path to your reporter. | | moduleType | 'commonjs' | Whether your reporter uses CommonJS or ES Modules. Possible values are commonjs and module. | | tsNodePath | 'node_modules/ts-node' | Path to your ts-node installation (only used for *.ts files). | | tsOptions | undefined | ts-node options (only used for *.ts files). |

TypeScript Usage

In order to use TypeScript with this reporter, at least ts-node and typescript packages should be installed.

npm install --save-dev ts-node typescript

After that you need to create reporter.config.ts file and specify path to your reporter.

module.exports = {
    path: 'reporter/index.ts'
};

As testcafe-reporter-custom use ts-node in order to execute TypeScript files, all it's rules are applied.

If you want to provide additional ts-node options, you can use tsOptions in the reporter configuration file.
For example, you can specify custom tsconfig file using the following configuration:

module.exports = {
    path: 'reporter/index.ts',
    tsOptions: {
        project: 'tsconfig.reporter.json'
    }
};

Usage Examples

There is a couple of usage examples available in this repository: