jest-multiple-result-processors

A test result processor that allows adding multiple processors easily

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jest-multiple-result-processors
140.0.42 years ago5 years agoMinified + gzip package size for jest-multiple-result-processors in KB

Readme

Multiple Jest Test Result Processors npm
CircleCI token codecov Dependencies install size npm downloads Snyk Vulnerabilities for npm package NPM
Jest currently has no capabilities of chaining multiple test result processors out of the box.
There is an issue raised on the official github of Jest, but it seems to not bare any fruit. The solution in that thread is to create your own processor which chains together the processors you need.
This small utility does just that.

Install

yarn add -D jest-multiple-result-processors

npm install --dev jest-multiple-result-processors

Configure

You have to tell Jest to use this library as its main test result processor. In addition to that, you need to configure this library and list all the modules you want to run on the test result. If the ordering matters (which I advise against), the results will be threaded through from top to bottom.

package.json

{
  "jestTestResultProcessors": [
    "test-result-processor-module-1",
    "./your-custom-processor.js"
  ],
  "jest": {
    "testResultsProcessor": "jest-multiple-result-processors"
  }
}

Disclaimer

This is the first draft of this package, feel free to submit changes.