0.0.10 • Published 7 years ago

esnext-coverage-format-html v0.0.10

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

esnext-coverage-format-html

NPM version

HTML formatter for esnext-coverage.

Similar to other coverage formatters, esnext-coverage-format-html accepts a coverage results object and produces a report as an utf8-encoded string.

Installation

npm install esnext-coverage-format-html --save-dev

Usage

Usage with test frameworks

Add esnext-coverage-format-html to the list of reporters in esnext-coverage configuration object or to your karma configuration file.

reporters: [
  {
    formatter: 'html', // require esnext-coverage-format-html
    outFile: 'reports/coverage.html' // write output to file
  }
]

Usage with esnext-coverage cli

esnext-coverage format coverage.json -f html -o report.html

Usage in Node

import fs from 'fs';
import formatter from 'esnext-coverage-format-html';

fs.readFile('coverage.json', 'utf8', (err, data) => {
  const coverage = JSON.parse(data);
  const report = formatter(coverage);
  fs.writeFile('coverage.html', report);
});

License

MIT License

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago