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

jest-test-list

v0.1.0

Published

`jest-test-list` is a powerful and flexible CLI tool for listing Jest tests in your project. With support for customizable output formats, clipboard integration, and Jest CLI options, it provides a streamlined way to inspect and manage your test suite.

Downloads

4

Readme

jest-test-list

jest-test-list is a powerful and flexible CLI tool for listing Jest tests in your project. With support for customizable output formats, clipboard integration, and Jest CLI options, it provides a streamlined way to inspect and manage your test suite.


Features

CLI

  • Output Formats: Display test lists as inline or in a tree structure.
  • Color Control: Enable or disable colored output.
  • Clipboard Integration: Copy test lists directly to your clipboard.
  • Customizable Package Management: Specify a package manager or allow auto-detection.
  • Working Directory Flexibility: Run Jest commands from any directory.
  • Extended Jest Options: Pass any valid Jest CLI options.

API

  • Use the API method extractTree to programmatically access test lists.

Installation

Install jest-test-list globally using npm or yarn:

npx jest-test-list
bunx jest-test-list
pnpm exec jest-test-list

or


Usage

npx jest-test-list <flags> <jest-options>

Options

| Option | Alias | Description | Default | |-------------------------|-------|----------------------------------------------------------|----------------------| | --format | -f | Output format: inline or tree | tree | | --noColor | | Disable color output | false | | --copyToClipboard | -c | Copy the output to the clipboard | false | | --packageManager | -p | Specify package manager to use (e.g., npm, yarn) | auto | | --workingDir | -w | Set working directory to run Jest in | Current directory | | --maxBuffer | | Set max buffer size for child process | 1024 * 1024 bytes | | -- <jest-options> | | Any valid Jest CLI options | - |


Examples

Basic Usage

List all tests in the default format:

npx jest-test-list

Disable Color Output

Run without color formatting:

npx jest-test-list --noColor -- <jest-options>

Specify Jest Options

Pass specific Jest CLI options:

npx jest-test-list -- --runInBand -- MyTestFile.test.ts

Copy to Clipboard

Copy test results directly to the clipboard:

npx jest-test-list --copyToClipboard

Change Output Format

List tests in an inline format:

npx jest-test-list --format inline

API Usage

The jest-test-list package provides an API method for programmatic usage:

extractTree

interface ExtractTreeOptions {
  packageManager?: string;
  maxBuffer?: number;
  extras?: string;
  cwd?: string;
}

export async function extractTree(options: ExtractTreeOptions = {}): Promise<TestsByFile[]>;

Parameters

  • packageManager (optional): Specify the package manager to use (e.g., npm, yarn).
  • maxBuffer (optional): Set the maximum buffer size for the child process.
  • extras (optional): Additional CLI arguments to pass.
  • cwd (optional): Specify the current working directory for the Jest process.

Returns

A promise that resolves to an array of TestsByFile objects, representing the extracted test structure.


Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push to your branch.
  4. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License.


Feedback & Support

For issues, feature requests, or general questions, please open an issue in the GitHub repository.