Socket
Socket
Sign inDemoInstall

jest-slow-test-highlighter

Package Overview
Dependencies
312
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jest-slow-test-highlighter

A custom Jest reporter that identifies and reports on the slowest running tests in your test suite.


Version published
Weekly downloads
1.4K
increased by2.97%
Maintainers
1
Install size
4.81 kB
Created
Weekly downloads
 

Readme

Source

jest-slow-test-highlighter

A custom Jest reporter that identifies and reports on the slowest running tests in your test suite.

Installation

Install the package using npm:

npm install jest-slow-test-highlighter --save-dev

Usage

In your Jest configuration file (e.g., jest.config.js), add jest-slow-test-highlighter to your list of reporters:

module.exports = {
  // ... other Jest configuration options
  reporters: ["default", "jest-slow-test-highlighter"]
};

Configuration Options

You can customize the behavior of the reporter by providing configuration options:

module.exports = {
  // ... other Jest configuration options
  reporters: [
    "default",
    ["jest-slow-test-highlighter", {
      maxTests: 10, // Maximum number of slow tests to display. Default is 10.
      slowSeconds: 5 // Threshold in seconds to consider a test as "slow". Default is 5 seconds.
    }]
  ]
};

Options

  • maxTests: Determines the maximum number of slow tests to display in the report. Default value is 10.

  • slowSeconds: The threshold in seconds to classify a test as "slow". Any test that runs longer than this threshold will be considered slow and will be reported. Default value is 5 seconds.

License

MIT

Keywords

FAQs

Last updated on 06 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc