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

slow-test-reporter

v1.0.0

Published

report slowest tests and provide suggestions

Readme

slow-test-reporter

A comprehensive Jest test reporter that identifies slow tests and provides actionable performance insights to optimize your test suite.

Features

  • 📊 Detailed Performance Analysis - Identifies slowest tests with duration statistics
  • 📈 Statistical Insights - Provides percentiles, median, standard deviation, and histograms
  • 📁 File-level Analysis - Shows which test files consume the most time
  • 🏗️ Suite Analysis - Identifies slow test suites and describe blocks
  • 💡 Smart Recommendations - Suggests specific optimizations based on your test patterns
  • 🎨 Colorized Output - Easy-to-read colored terminal output
  • 📋 Multiple Output Formats - Human-readable text or JSON for automation
  • Overhead Detection - Identifies files with high setup/teardown overhead

Installation

bun:

bun add -d slow-test-reporter

npm:

npm install --save-dev slow-test-reporter

pnpm:

pnpm add -D slow-test-reporter

yarn:

yarn add --dev slow-test-reporter

Usage

Basic Configuration

Add the reporter to your Jest configuration:

// jest.config.js
module.exports = {
  reporters: [
    'default',
    'slow-test-reporter'
  ]
};

With Options

// jest.config.js
module.exports = {
  reporters: [
    'default',
    'slow-test-reporter'
  ]
};

Output Example

Top 30 slowest examples (8.4 s, 18.6% of total time):
  Database migration rollback test
    2.85 s ./src/database/migrations.test.js
  Large file upload with validation
    2.12 s ./src/uploads/fileProcessor.test.js
  Complex authentication flow
    1.94 s ./src/auth/integration.test.js

Average test time: 36.24 ms
Median test time: 18.00 ms
Standard deviation: 127.45 ms
Slowest test is 78.6x slower than average

Percentiles:
  90th: 128.00 ms
  95th: 267.00 ms
  99th: 891.00 ms

Tests exceeding threshold (>300 ms): 15

Duration histogram:
  0-50ms: 1089 ████████████████████████████████████████████████
  51-100ms: 98 ████
  101-200ms: 45 ██
  201-500ms: 12 ▌
  501-1000ms: 2 ▌
  1000ms+: 1 ▌

Top 5 slowest files (by total test duration):
  ./src/database/migrations.test.js: 6.24 s (15 tests, avg: 416.00 ms), overhead: 1.2 s (19.2%)
  ./src/uploads/fileProcessor.test.js: 4.81 s (23 tests, avg: 209.13 ms), overhead: 0.8 s (16.6%)
  ./src/auth/integration.test.js: 3.94 s (8 tests, avg: 492.50 ms), overhead: 0.3 s (7.6%)

Top 5 slowest test suites:
  Database Integration Tests: 8.34 s (28 tests, avg: 297.86 ms)
  File Upload Processing: 6.12 s (31 tests, avg: 197.42 ms)
  Authentication Flows: 4.88 s (19 tests, avg: 256.84 ms)

Recommended Improvements:
- 3 file(s) spend >50% of their runtime in setup/teardown. Potential impact: 2.3 s saved if optimized.
- 2 file(s) are in the top 10% for both test count and total time. Consider splitting/refactoring.
- 5 test(s) are >10x slower than the median. Investigate for unnecessary waits or unmocked dependencies.

## Requirements

- Node.js ≥ 20.0.0
- Jest ≥ 27.0.0

## License

MIT © Doug Schlenker

## Contributing

Issues and pull requests are welcome! Please see the [GitHub repository](https://github.com/schlenks/slow-test-reporter) for more information.