byzantine

    1.1.0 • Public • Published

    Byzantine

    Istanbul json coverage parser

    Install

    Byzantine expects node 6

    yarn add byzantine
    # or 
    npm install byzantine --save

    Usage

    Byzantine has 2 module: parse and aggregate:

    const parse = require('byzantine');
    const aggregate = require('byzantine/aggregate');
    const json = require('./coverage/coverage-final.json');
     
    // returns Array<Coverage>
    const coverages = parse(json);
    // returns CoverageAggregate
    const { statements, branches, functions } = aggregate(coverages);

    The main module (byzantine) returns array of simplified coverage information.

    type Coverage {
      path: String
      statements: CoverageData
      branches: CoverageData
      functions: CoverageData
    }
     
    type CoverageData {
      covered: Int
      all: Int
    }

    aggregate returns percentage of coverage for each category in Float, or null for empty array

    type CoverageAggregate {
      statements: ?Float
      branches: ?Float
      functions: ?Float
    }

    License

    MIT

    Install

    npm i byzantine

    DownloadsWeekly Downloads

    472

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • pveyes