https://github.com/inside/jest-duration-results-processor
A jest results processor showing test files that exceed a duration threshold
https://github.com/inside/jest-duration-results-processor
Last synced: about 1 year ago
JSON representation
A jest results processor showing test files that exceed a duration threshold
- Host: GitHub
- URL: https://github.com/inside/jest-duration-results-processor
- Owner: inside
- License: mit
- Created: 2018-05-28T18:47:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-28T19:51:38.000Z (about 8 years ago)
- Last Synced: 2024-04-25T14:03:03.415Z (about 2 years ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jest-duration-results-processor
A jest results processor showing test files that exceed a duration threshold
## Installation
```shell
$ npm install jest-duration-results-processor --save-dev
```
## Configuration
By default, the threshold duration is set to 10 seconds. Use an environment
variable to override the default:
```shell
# Set the duration threshold to 1 seconds
$ export JEST_RESULTS_DURATION_THRESHOLD=1000
```
## Usage with the jest command
```shell
# Launch all test suites and report files exceededing a duration of 5 seconds
$ JEST_RESULTS_DURATION_THRESHOLD=5000 \
jest --testResultsProcessor ./node_modules/jest-duration-results-processor
```
## Usage with the package.json file
```json
{
"scripts": {
"test:duration": "JEST_RESULTS_DURATION_THRESHOLD=5000 jest --testResultsProcessor ./node_modules/jest-duration-results-processor"
},
}
```