@cvrg-report/cobertura-json

0.1.3 • Public • Published

cobertura-json

Parse cobertura report files, and return a JSON representation in a lcov-parse compatible manner.

Installation

npm install @cvrg-report/cobertura-json --save

Usage

var cobertura = require( "@cvrg-report/cobertura-json" );

// Parse by file path
cobertura.parseFile("filepath.xml")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

// Parse by file contents
cobertura.parseContent("<?xml version=\"1.0\" ?><coverage>...</coverage>")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

Thanks

This repo was initially forked from vokal/cobertura-parse. Thanks a lot!

Readme

Keywords

none

Package Sidebar

Install

npm i @cvrg-report/cobertura-json

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

26.4 kB

Total Files

7

Last publish

Collaborators

  • tobilg