# jest-coverage-processor

> Utils for working with Jest coverage data (auto update thresholds, etc.)

Latest version **2.1.0** (published 2020-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-coverage-processor
pnpm add jest-coverage-processor
yarn add jest-coverage-processor
bun add jest-coverage-processor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2020-03-04 |
| First published | 2018-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | degiro |
| Maintainers | degiro |
| Keywords | Jest, thresholds, auto-update |

## Links

- npm: https://www.npmjs.com/package/jest-coverage-processor
- Repository: https://github.com/degiro/jest-coverage-processor
- Homepage: https://github.com/degiro/jest-coverage-processor#readme
- Issues: https://github.com/degiro/jest-coverage-processor/issues
- npm.io page: https://npm.io/package/jest-coverage-processor

## Recent versions

- 2.1.0 (latest) — 2020-03-04
- 2.0.0 — 2019-11-13
- 1.1.1 — 2018-12-27
- 1.1.0 — 2018-12-27
- 1.0.0 — 2018-07-30

## README

# jest-coverage-processor
Utils for working with Jest coverage data (auto update thresholds, etc.)

## Installation
```shell
npm i jest-coverage-processor --save-dev
```

## updateThresholds
* Update your Jest config:

```js
// jest.config.js
module.exports = {
  // ...
  testResultsProcessor: '<rootDir>/test-results-processor.js'
};
```

* Add a test processor script:

```js
// <rootDir>/test-results-processor.js
const path = require('path');
const {updateThresholds} = require('jest-coverage-processor');

module.exports = function (results) {
   return updateThresholds(results, {
       configPath: path.resolve(__dirname, './jest.config.js'),
       outputSpaces: '  ' // optional, default: 4 spaces, '    '
   });
};
```

---
_Source: https://npm.io/package/jest-coverage-processor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
