@cvrg-report/jacoco-json
v0.1.2
Published
Parse jacoco coverage data to JSON, using the same format as lcov-parse
Downloads
38
Readme
jacoco-json
Parse jacoco report files, and return a JSON representation in a lcov-parse compatible manner.
Installation
$ npm i @cvrg-report/jacoco-json --save
Usage
var jacoco = require("@cvrg-report/jacoco-json");
// Parse by file path
jacoco.parseFile("filepath.xml")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});
// Parse by file contents
jacoco.parseContent("<?xml version=\"1.0\" ?><report>...</report>")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});
Thanks
This repo was initially forked from vokal/jacoco-parse. Thanks a lot!