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-wip-reporter

v2.1.0

Published

A Jest reporter that treats all incomplete tests as WIP

Downloads

1,419

Readme

jest-wip-reporter

npm version Downloads

An opinionated Jest reporter that treats all incomplete tests as WIP.

Philosophy

This reporter considers every test to be in one of three states: passing, failing, or WIP (work in progress). WIP tests represent work that is still to be finished; they won't fail your build, but the reporter will call them out and remind you loudly that your work isn't done yet.

In Jest terms, this reporter marks a test as WIP if it:

  • is marked as .todo, .failing or .skip, or
  • is skipped due to some other describe or it being marked with .only, or
  • contains no assertions.

Note that a .failing test that Jest would report as "passing" (because the test run failed) will be marked as WIP by this reporter, because the work related to it is not yet finished.

Output

image

The report generated comprises four parts:

  1. A progress report in which the outcome of each test is represented by a single character:

    • Passing: a green '.'
    • WIP: an amber '?'
    • Failing: a red 'x'
  2. A summary of WIP tests.

  3. Details of any failures.

  4. A summary of the test run.

Configuring the progress report

By default the reporter emits a single character when each test runs:

  • Passing: a green '.'
  • WIP: an amber '?'
  • Failing: a red 'x'

In this default view, the output contains a single character for each test, but describe blocks and test names are not represented.

If you need to see more context, the progress report can be configured to emit a tree of nested describe and test names by setting the environment variable $JWR_PROGRESS to tree (the default value is dots).

In the tree report, each describe is coloured to match the "worst" outcome of the tests it contains. For example, a describe block containing a WIP test and a failing test would be rendered as failing, because a failing test is "worse" than a WIP test.

Configuring the WIP report

If you have any WIP tests, by default this reporter will list them as a tree of nested describe and test titles. To replace this with a flat list of fully-qualified test names set the environment variable $JWR_WIP_REPORT to list (the default value is tree).

Installation

Install as a development dependency:

npm install --save-dev jest-simple-dot-reporter

or

yarn add --dev jest-simple-dot-reporter

Then configure Jest to use this reporter.

For example, create a jest.config.js file containing:

module.exports = {
  "verbose": false,
  "reporters": [
    "jest-wip-reporter",
  ]
};