Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brodycj/jest-summarizing-reporter-plain
based on: https://github.com/sunfit/jest-summary-reporter
https://github.com/brodycj/jest-summarizing-reporter-plain
Last synced: about 1 month ago
JSON representation
based on: https://github.com/sunfit/jest-summary-reporter
- Host: GitHub
- URL: https://github.com/brodycj/jest-summarizing-reporter-plain
- Owner: brodycj
- License: unlicense
- Created: 2019-11-10T19:12:33.000Z (about 5 years ago)
- Default Branch: dev
- Last Pushed: 2020-04-02T19:29:44.000Z (almost 5 years ago)
- Last Synced: 2024-07-31T00:17:37.069Z (5 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Jest summarizing reporter
Custom reporter for Jest that only prints the summary of the test run. With `diffs` option, also prints the default error messages aka diffs [before the summary](#withDiffsExmaple).
[![jestsummaryreporternodiffssmall](https://user-images.githubusercontent.com/46559896/50974595-455fe900-14f4-11e9-8a5b-c69d367926d5.png)](https://user-images.githubusercontent.com/46559896/50974595-455fe900-14f4-11e9-8a5b-c69d367926d5.png)
Personally I think this behaviour should not require a custom reporter,
and the level of similarity between this and the default output should be proof enough.Tested only on my windows machine with a simple pet project.
If you have any questions or suggestions contact me by e-mail.
It came to my attention (a little too late) that at least 3 packages with same functionality already exist [npm search results for jest summary reporters](https://www.npmjs.com/search?q=jest%20summary%20reporter)
So if you have found this repo but it is not working out for you for some reason, check out above link.
## Installation
```
npm i -D jest-summarizing-reporter
```## Usage
CLI:
```
jest --reporters jest-summarizing-reporter
```
Jest Config:```
{
"reporters": ["jest-summarizing-reporter"]
}
```## Options
### diffs
If enabled prints jests default error explanations before the summary
```
{
"reporters": [
["jest-summarizing-reporter", {diffs: true}]
]
}
```## Output examples
Default output:[![jestsummaryreporternodiffs](https://user-images.githubusercontent.com/46559896/50972422-45a9b580-14ef-11e9-9d64-62202d00c6f9.png)](https://user-images.githubusercontent.com/46559896/50972422-45a9b580-14ef-11e9-9d64-62202d00c6f9.png)
[![jestsummaryreporter](https://user-images.githubusercontent.com/46559896/50972423-46424c00-14ef-11e9-8218-40459b150cde.png)](https://user-images.githubusercontent.com/46559896/50972423-46424c00-14ef-11e9-8218-40459b150cde.png)
When all tests pass:
[![jestsummaryreportersuccess](https://user-images.githubusercontent.com/46559896/50972424-46424c00-14ef-11e9-8c21-8f986d9d2379.png)](https://user-images.githubusercontent.com/46559896/50972424-46424c00-14ef-11e9-8c21-8f986d9d2379.png)
## License
Unlicense