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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jest-compact-reporter

v1.2.9

Published

A more comapct reporter for Jest.

Downloads

9,325

Readme

Jest Compact Reporter

Fork of Sunfit's jest-summary-reporter. Rewritten in TypeScript with a few additional options.

Motivation

The default Jest reporter output is sometimes too fancy, especially in environments which doesn't support things such as colours etc. This can make the output difficult to read.

This custom reporter will print a more compact form of the information showing only the failed tests by default.

Additional options are available to customise the output. See options.

Examples

Default

default-output

No colours

default-output

Show passing tests

With single test

default-output

With multiple tests

default-output

No diffs

default-output

Mixed tests

default-output

Installation

With NPM

npm i -D jest-compact-reporter

With Yarn

yarn add jest-compact-reporter -D

Usage

CLI

jest <...args> --reporters jest-compact-reporter

Jest Config

No options

// jest.config.js or jest.config.ts
{
  "reporters": ["jest-compact-reporter"]
}

With options

// jest.config.js or jest.config.ts
{
  "reporters": [
      ["jest-compact-reporter", { diffs: true, colours: true, showPassingTests: false }]
    ]
}

Options

diffs

Defaults to true. If enabled prints Jest's default error explanations for each failing test.

colours

Defaults to true. If enabled adds colours to the output for improved readability. Disable when an environment doesn't support colours.

showPassingTests

Defaults to false. If enabled shows test names of passing tests as well rather than just the suite.

Contributing

Requirements

  • Node 12+
  • Jest 20+
  • NPM 6 or Yarn

Developing

  1. Run npm install or yarn install
  2. Run npm build-and-test to test changes to the reporter. Note the default jest.config.ts has already been setup to use the development reporter.

License

Unlicense Licence

See LICENCE.md