istanbul-lib-report

Base reporting library for istanbul

BSD-3-Clause 25 个版本
安装
npm install istanbul-lib-report
yarn add istanbul-lib-report
pnpm add istanbul-lib-report
bun add istanbul-lib-report
README

istanbul-lib-report

Greenkeeper badge Build Status

Core reporting utilities for istanbul.

Example usage

const libReport = require('istanbul-lib-report');
const reports = require('istanbul-reports');

// coverageMap, for instance, obtained from istanbul-lib-coverage
const coverageMap;

const configWatermarks = {
  statements: [50, 80],
  functions: [50, 80],
  branches: [50, 80],
  lines: [50, 80]
};

// create a context for report generation
const context = libReport.createContext({
  dir: 'report/output/dir',
  // The summarizer to default to (may be overridden by some reports)
  // values can be nested/flat/pkg. Defaults to 'pkg'
  defaultSummarizer: 'nested',
  watermarks: configWatermarks,
  coverageMap,
})

// create an instance of the relevant report class, passing the
// report name e.g. json/html/html-spa/text
const report = reports.create('json', {
  skipEmpty: configSkipEmpty,
  skipFull: configSkipFull
})

// call execute to synchronously create and write the report to disk
report.execute(context)
版本列表
3.0.1 2023-07-25
3.0.0-alpha.2 2019-12-07
3.0.0-alpha.1 2019-10-06
3.0.0-alpha.0 2019-06-19
3.0.0 2019-12-20
2.0.8 2019-04-24
2.0.7 2019-04-09
2.0.6 2019-04-03
2.0.5 2019-03-12
2.0.4 2019-01-26
2.0.3 2018-12-25
2.0.2 2018-09-06
2.0.1 2018-07-07
2.0.0 2018-06-06
1.1.5 2018-09-05
1.1.4 2018-03-04
1.1.3 2018-02-13
1.1.2 2017-10-21
1.1.1 2017-05-27
1.1.0 2017-04-29
1.0.0-alpha.3 2015-11-28
1.0.0-alpha.2 2015-11-27
1.0.0-alpha.1 2015-11-26
1.0.0-alpha.0 2015-11-22
1.0.0 2017-03-27