# mocoverage

> a mocha reporter with coverage using blanket.

Latest version **1.0.0** (published 2015-01-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install mocoverage
pnpm add mocoverage
yarn add mocoverage
bun add mocoverage
```

## 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 | 1.0.0 |
| Published | 2015-01-17 |
| First published | 2015-01-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ben Coe |
| Maintainers | bcoe |
| Keywords | mocha, blanket, coverage |

## Links

- npm: https://www.npmjs.com/package/mocoverage
- Repository: https://github.com/bcoe/mocoverage
- Issues: https://github.com/bcoe/mocoverage/issues
- npm.io page: https://npm.io/package/mocoverage

## Dependencies (1)

- [mocha-text-cov](https://npm.io/package/mocha-text-cov.md) ^0.1.0

## Recent versions

- 1.0.0 (latest) — 2015-01-17

## README

# mocoverage

All-in-one reporter with test-coverage for mocha, using [blanket](https://www.npmjs.com/package/blanket), and
[mocha-text-cov](https://www.npmjs.com/package/mocha-text-cov).

# Configuring

1. install the dependencies:

```bash
npm install mocha --save-dev
npm install blanket --save-dev
npm install mocoverage --save-dev
```

2. add the following test line to the `scripts` stanza in your package.json:

```json
  {
    "scripts": {
      "test": "mocha --check-leaks --ui exports --require blanket -R mocoverage"
    }
  }
```

3. add configuration for blanket and mocoverage:

```javascript
{
  "config": {
    "blanket": {
      "pattern": "lib",
      "data-cover-never": [
        "node_modules",
        "test"
      ],
      "output-reporter": "spec"
    }
  }
}
```

_The important parts:_

* `output-reporter`: is the reporter that mocha will use for test output, in this
  case the output is in spec format.
* `pattern`: is the pattern used to match files that coverage should be applied to.

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