jest-slow-test-highlighter

raw JSON →
1.0.2 verified Sat Apr 25 auth: no javascript

A custom Jest reporter that identifies and reports on the slowest running tests in your test suite. Current stable version is 1.0.2. Release cadence is low, single maintainer. Key differentiator: simple configuration with maxTests and slowSeconds options, integrates seamlessly as a Jest reporter. No major updates since initial release.

error TypeError: reporters[1] is not a function or string
cause Misconfigured reporters array; reporter is not found or wrong format.
fix
Ensure reporters array uses correct string or tuple format: ['jest-slow-test-highlighter', {...}]
gotcha Requires Jest version ^30.1.3; incompatible with older Jest versions.
fix Upgrade Jest to ^30.1.3 or later.
npm install jest-slow-test-highlighter
yarn add jest-slow-test-highlighter
pnpm add jest-slow-test-highlighter

Installs the package and configures Jest to use the reporter with custom settings.

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

// jest.config.js
module.exports = {
  reporters: [
    'default',
    ['jest-slow-test-highlighter', { maxTests: 5, slowSeconds: 2 }]
  ]
};