Skip to content

Commit

Permalink
Added usage to README
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaltman committed Feb 25, 2018
1 parent 96eea0a commit e2c4a4d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

Convert coverage output from [Coveralls][coveralls] to an [Istanbul][istanbul] format

## Usage

Puppeteer to Istanbul isn't available on NPM yet, so to use it, first clone the repository. Then run the following commands:

```
node run.js your_puppeteer_coverage.json
./node_modules/.bin/nyc report --reporter=html
```

This will run Istanbul's HTML Reporting through [nyc][nyc] based on the output of the converted `your_puppeteer_coverage.json`.

To get a JSON output of your Puppeteer coverage, take a look at [this Puppeteer example](https://github.com/GoogleChrome/puppeteer/blob/v1.1.0/docs/api.md#class-coverage) of pulling coverage, and simply write the `jsCoverage` object out to a JSON file.

[coveralls]: https://github.com/GoogleChrome/puppeteer
[istanbul]: https://github.com/istanbuljs/istanbuljs
[nyc]: https://github.com/istanbuljs/nyc

0 comments on commit e2c4a4d

Please sign in to comment.