0.1.3 • Published 3 years ago

@cvrg-report/cobertura-json v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

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!

0.1.3

3 years ago

0.1.2

5 years ago

0.1.1

7 years ago