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

@tracegraph/jest

v0.3.1

Published

TraceGraph reporter for Jest — captures test structure and results as structured traces

Readme

@tracegraph/jest

TraceGraph reporter for Jest. Produces per-test .trace.json files (capture level 5), giving each test case its own isolated trace with full test-lifecycle events. Drop-in addition to any existing Jest setup.

What's in this package

| Export | Description | |--------|-------------| | TraceGraphJestReporter | Jest reporter class — implements onTestFileStart, onTestStart, onTestResult, and onRunComplete to write one trace per test |

The package also provides a default export so Jest can load it via the short-form string '@tracegraph/jest' without needing the class name.

Installation

npm install -D @tracegraph/jest jest

Usage

Add to jest.config.js

module.exports = {
  reporters: [
    'default',
    '@tracegraph/jest',
  ],
};

With options (currently none required, reserved for future use):

module.exports = {
  reporters: [
    'default',
    ['@tracegraph/jest', {}],
  ],
};

Via tracegraph run (auto-injection)

tracegraph run -- npx jest
# → "@tracegraph/jest reporter auto-injected"

tracegraph run detects Jest in the command and appends --reporters=default --reporters=@tracegraph/jest automatically unless the reporter is already present.

Direct CLI usage

npx jest --reporters=default --reporters=@tracegraph/jest

What the reporter captures

Each test trace includes:

  • test_file event — the test file path and suite structure
  • test_run event per test — test name, pass/fail/skip/todo status, and duration in milliseconds
  • error event on test failure — error type and message extracted from Jest's test result
  • All events emitted by traceFunction / traceMethod / traceExpress instrumentation running inside the test body

Trace isolation

Each test in a test file gets its own traceId. Events are written to separate .tmp files per test and atomically finalised to .trace.json files when the test completes.

Requirements

  • Jest ≥ 27.0.0
  • TRACEGRAPH_ENABLED=1 and TRACEGRAPH_RUN_DIR set in the environment (set automatically by tracegraph run)