Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisgalvan/jest-standard-reporter
Jest reporter that uses stdout for messages and stderr for errors
https://github.com/chrisgalvan/jest-standard-reporter
hacktoberfest
Last synced: 3 months ago
JSON representation
Jest reporter that uses stdout for messages and stderr for errors
- Host: GitHub
- URL: https://github.com/chrisgalvan/jest-standard-reporter
- Owner: chrisgalvan
- License: mit
- Created: 2019-02-06T15:29:13.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T22:21:17.000Z (3 months ago)
- Last Synced: 2024-07-26T23:31:53.534Z (3 months ago)
- Topics: hacktoberfest
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/jest-standard-reporter
- Size: 218 KB
- Stars: 23
- Watchers: 2
- Forks: 10
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jest - jest-standard-reporter
README
![npm](https://img.shields.io/npm/v/jest-standard-reporter.svg?style=flat-square)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/jest-standard-reporter.svg?style=flat-square)
![downloads](https://img.shields.io/npm/dm/jest-standard-reporter.svg?style=flat-square)
![mit](https://img.shields.io/github/license/chrisgalvan/jest-standard-reporter?style=flat-square)
![keywords](https://img.shields.io/github/package-json/keywords/chrisgalvan/jest-standard-reporter?style=flat-square)# Jest Standard Reporter
[Jest](https://jestjs.io/) [reporter](https://jestjs.io/docs/en/configuration#reporters-arraymodulename--modulename-options)
that uses `stdout` for messages and `stderr` for errors.## Installation
Using [npm](https://www.npmjs.com/):
```sh
npm install --save-dev jest-standard-reporter
```Using [yarn](https://yarnpkg.com/):
```sh
yarn add --dev jest-standard-reporter
```## Usage
Jest CLI:
```sh
jest --reporters=jest-standard-reporter
```Jest config:
```json
{
"reporters": ["jest-standard-reporter"]
}
```Supports the following Jest configurations:
- [`useStderr`](https://jestjs.io/docs/en/cli#usestderr)
- [`verbose`](https://jestjs.io/docs/en/cli#verbose)## Inspiration
Jest uses `stderr` to print the results of the tests (as opposed to `stdout`; [see issue #5064](https://github.com/facebook/jest/issues/5064)). Many CI tools mark any output coming from `stderr` as a failure, making builds to fail even when the tests pass (false positive).
This reporter uses `stdout` to print messages and only uses `stderr` when an error is thrown.
If you chose to, you could override this behavior using the `useStderr` flag.
## License
MIT