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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jest-regression

v1.0.3

Published

Jest test regression detection.

Readme

Jest regression

Simple zero dependency tool to check for test regression between commits.

Features:

  • create basic json report for current project state and save it under current checked out git commit id
  • check for test regression between two commits node ./node_modules/.bin/jest-regression <fom commit> <to commit>

Installation

npm install jest-regression

Running

First create report for your current project state. Just simply run all tests with jest. Report with name of current checked out git commit id will be saved inside ./jest-regression folder (you can change default folder via config).

For instruction purposes lets say commit id is 79262dc. Example: ./jest-regression/79262dc.json

When you our your co-worker do next commit (lets say it's 4930822), just simply run tests again. Report will saved: Example: ./jest-regression/4930822.json

Now you can make regression test with command jest-regression <fom commit> <to commit>.

Example:

$ node ./node_modules/.bin/jest-regression 79262dc 4930822

... or if you add "jest-regression": "jest-regression" under scripts in package.json:

<package.json>

{
 ...
 "scripts": {
    "jest-regression": "jest-regression"
 },
 ...
}
$ npm run jest-regression 79262dc 4930822

Example output:

$ jest-regression "79262dc" "4930822"

Checking for test regression from commit 5751a1a to 01d30c6.
Regression detected.
-----------
 FAILED    Test suite A Test 001
/path/to/test/file.spec.ts

 FAILED    Test suite A Test 002
/path/to/test/file.spec.ts

 FAILED    Test suite B Test 001
/path/to/test/file.b.spec.ts

Config

By default you don't have to configure anything.

| Key | Default value | Description | |---|---|---| | testResultsProcessor | / | used to call next results processor, for example jest-html-reporter | | skip | false | to skip jest-regression | | skipNextProcessor | false | to prevent running next results processor | | outputDir | './jest-regression' | save directory for jest-regression |

Configuration is done via package.json

Example - changing output dir:

{
 ...
 "jest-regression": {
    "outputDir": "./jest-regression"
  }
  ...
}

Example - passing results to jest-html-reporter package:

{
 "scripts": {
    "jest-regression": "jest-regression"
 },
    
 ...
 "jest-regression": {
    "testResultsProcessor": "./node_modules/jest-html-reporter",
    "skipNextProcessor": false,
  }
  ...
}

Example - skip report creation:

{
 ...
 "jest-regression": {
    "skip": true
  }
  ...
}

Full example:

{
 "scripts": {
    "jest-regression": "jest-regression"
 },
    
 ...
 "jest-regression": {
    "testResultsProcessor": "./node_modules/jest-html-reporter",
    "skip": false,
    "skipNextProcessor": false,
    "outputDir": "./jest-regression"
  }
  ...
}