jest-md-reporter

A silent fork of jest-standard-reporter (that uses stdout for messages and stderr for errors)

Usage no npm install needed!

<script type="module">
  import jestMdReporter from 'https://cdn.skypack.dev/jest-md-reporter';
</script>

README

npm npm bundle size downloads mit keywords

Jest .md Reporter

This is a simple fork from jest-standard-reporter v1.0.4 (819f7452) below, just stripping some stuff (like (2ms) after tests, so it can be used for our tests-as-docs generation.

Jest Standard Reporter

Jest reporter that uses stdout for messages and stderr for errors.

Installation

Using npm:

npm install --save-dev jest-md-reporter

Using yarn:

yarn add --dev jest-md-reporter

Usage

Jest CLI:

jest --reporters=jest-md-reporter

Jest config:

{
  "reporters": ["jest-md-reporter"]
}

Supports the following Jest configurations:

Inspiration

Jest uses stderr to print the results of the tests (as opposed to stdout; see issue #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