The `jest-multi-test-result-processor` package enables Jest to use multiple `testResultProcessor` modules for generating diverse test reports from a single test run. Prior to Jest's native support for multiple reporters, this package filled a gap by allowing composition of various output formats like JUnit XML and HTML. It operates by delegating the final test results to a list of specified processors in sequence. The package's current stable version is 1.0.0, last published in February 2018. Its release cadence is effectively inactive, as it has not been updated in over eight years. While historically useful, Jest's built-in `reporters` array (introduced around Jest 20 in May 2017) largely superseded the need for this package for most common reporting needs, and the `testResultsProcessor` option itself is now considered a legacy feature by many reporter packages.
npm install jest-multi-test-result-processorVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure `jest-multi-test-result-processor` in `package.json` to process test results using both `jest-junit` and `jest-html-reporter`. It includes a sample `package.json` with dev dependencies and the necessary Jest configuration, alongside a basic test file to generate output for the specified processors.
Migrate your Jest configuration to use the `reporters` array instead of `testResultsProcessor`. Install desired reporters (e.g., `jest-junit`, `jest-html-reporter`) directly and list them in the `reporters` array in `jest.config.js` or `package.json`.
Strongly consider replacing this package with Jest's native `reporters` array. If unique functionality is required, evaluate other actively maintained community solutions or custom Jest reporters.
Ensure that processor paths are correctly resolved by Jest. For modules installed via npm, the module name is often sufficient, but for specific or custom processors, a full or relative path might be necessary (e.g., in `package.json` config: `"processors": ["jest-junit", "./node_modules/jest-html-reporter"]`).
Ensure you are using a Jest version that supports `testResultsProcessor` (though it is deprecated in newer versions). If on a modern Jest version, switch to using the `reporters` array configuration instead.
Install the package: `npm install --save-dev jest-multi-test-result-processor` or `yarn add --dev jest-multi-test-result-processor`. Verify the path if configured explicitly.