JSPM

@cvrg-report/clover-json

0.3.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4207
  • Score
    100M100P100Q140583F
  • License MIT

Parse clover XML coverage reports to JSON, using the same format as lcov-parse

Package Exports

  • @cvrg-report/clover-json
  • @cvrg-report/clover-json/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cvrg-report/clover-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

clover-json

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

Installation

$ npm i @cvrg-report/clover-json --save

Usage

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

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

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