@Bizantine/report-generator
Introduction
The library generates a JavaScript code coverage report for modified files by comparing them with git-diff information, and presents the report in the istanbul.js (also known as nyc) HTML format.
Usage
API - genReport
const { genReport } = require('@bizantine/report-generator')
genReport({
coverageOb: coverage,
targetPath: somewhere,
gitDiff: diff,
otherCoverageOb: oldCoverRawData
}).then((coverRawData)=>{
})
genReport
function generate code coverage report in HTML format at targetPath
- coverageOb : an object build by
@bizantine/babel-plugin
- targetPath : the report file path
- gitDiff : git diff log messages
- otherCoverageOb : other coverage data expected be merged to coverageOb
Sample Code