Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jodonnell/jest-slow-test-reporter
https://github.com/jodonnell/jest-slow-test-reporter
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jodonnell/jest-slow-test-reporter
- Owner: jodonnell
- Created: 2017-11-18T23:19:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T16:25:01.000Z (over 4 years ago)
- Last Synced: 2024-11-13T16:12:01.252Z (30 days ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 51
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-jest - jest-slow-test-reporter
README
# Slow test reporter for jest
No dependencies, no interactive shell needed. Prints out the slowest 10 tests in your app. Can also print warnings when a test exceeds X ms.
## Installation
You may install this package as a development dependency:
```bash
npm install --save-dev jest-slow-test-reporter
yarn add --dev jest-slow-test-reporter
```## Configuration
Configure [Jest](https://facebook.github.io/jest/docs/en/configuration.html) to use the reporter.
For example, create a `jest.config.js` file containing:
```javascript
module.exports = {
verbose: false,
reporters: [
['jest-slow-test-reporter', {"numTests": 8, "warnOnSlowerThan": 300, "color": true}]
]
};
```numTests controls how many slow tests to print.
warnOnSlowerThan will warn when a test exceeds this time in milliseconds.
color will make the warnOnSlowerThan warning messages print in red