# karma-coverage-istanbul-es5-preprocessor

> Karma preprocessor to instrument es5 files for use with karma-coverage-istanbul-reporter

Latest version **1.0.1** (published 2017-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-coverage-istanbul-es5-preprocessor
pnpm add karma-coverage-istanbul-es5-preprocessor
yarn add karma-coverage-istanbul-es5-preprocessor
bun add karma-coverage-istanbul-es5-preprocessor
```

## 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.1 |
| Published | 2017-06-21 |
| First published | 2017-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jensbodal@gmail.com |
| Maintainers | jensbodal |
| Keywords | karma, karma-plugin, karma-preprocessor, coverage, istanbul, istanbul-lib-instrument, karma-coverage-istanbul-reporter |

## Links

- npm: https://www.npmjs.com/package/karma-coverage-istanbul-es5-preprocessor
- Repository: https://github.com/jensbodal/karma-coverage-istanbul-es5-preprocessor
- Homepage: https://github.com/jensbodal/karma-coverage-istanbul-es5-preprocessor#readme
- Issues: https://github.com/jensbodal/karma-coverage-istanbul-es5-preprocessor/issues
- npm.io page: https://npm.io/package/karma-coverage-istanbul-es5-preprocessor

## Dependencies (1)

- [istanbul-lib-instrument](https://npm.io/package/istanbul-lib-instrument.md) 1.7.2

## Recent versions

- 1.0.1 (latest) — 2017-06-21
- 1.0.0 — 2017-06-21

## README

The use case for this came from trying to get coverage reports for an Angular/AngularJS hybrid application.  Angular uses the angular-cli
which uses the `karma-coverage-istanbul-reporter` under the hood.  Some guides would say to use `karma-coverage` and the report type of
`in-memory` to create a report in memory so that it can instrument your AngularJS code.  While this works fine for summary reports,
you were not able to drill down into html reports to see AngularJS code because `karma-coverage` does not use the `istanbul-lib-coverage`
from the `istanbul-api` but rather the Instrumenter direct from `istanbul`.  This is just a simple wrapper which calls that under the hood.

**karma.conf.js** (modified from an angular-cli generated app)

```
{
    plugins: [
        require('karma-coverage-istanbul-es5-preprocessor')
    ],
    preprocessors: {
        './src/**/*.js': ['coverage-istanbul-es5']
    },
    coverageIstanbulReporter: {
        dir: paths.results + '/coverage',
        reports: [
            'html',
            'text-summary'
        ],
        fixWebpackSourcePaths: true
    },
    reporters: [
        'progress',
        'coverage-istanbul'
    ],
}
```

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