Nifty Procrastination Machine
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@start/plugin-lib-istanbul

2.0.0 • Public • Published

💯 plugin-lib-istanbul

Collect, report and check code coverage using Istanbul.

Install

$ yarn add --dev @start/plugin-lib-istanbul

Usage

Signature

istanbulInstrument(extensions?: string[])

options

extensions

File extensions to instrument, for example ['.ts']

import type { ReportType } from 'istanbul-reports'
 
istanbulReports(formatsReportType[] = ['lcovonly', 'text-summary'])
istanbulThresholds(options{
  branches?: number,
  functions?: number,
  lines?: number,
  statements?: number 
})

Example

import sequence from '@start/plugin-sequence'
import find from '@start/plugin-find'
import {
  istanbulInstrument,
  istanbulReport,
  istanbulThresholds
} from '@start/plugin-lib-istanbul'
import tape from '@start/plugin-lib-tape'
 
export const task = () =>
  sequence(
    find('src/**/*.js'),
    istanbulInstrument(),
    find('test/**/*.js'),
    tape(),
    istanbulReport(['lcovonly', 'html', 'text-summary']),
    istanbulThresholds({ functions: 100 })
  )

Install

npm i @start/plugin-lib-istanbul

DownloadsWeekly Downloads

77

Version

2.0.0

License

MIT

Unpacked Size

11.8 kB

Total Files

15

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar