Socket
Socket
Sign inDemoInstall

@nullcc/unicov

Package Overview
Dependencies
10
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nullcc/unicov

Transforms coverage into an unify coverage format.


Version published
Maintainers
1
Install size
2.78 MB
Created

Readme

Source

unicov

Transforms coverage into an unify coverage format.

Supported coverage reporter types:

  • istanbul
  • cobertura
  • jacoco
  • xccov
  • clover
  • llvm-cov
  • auto (unicov will detect coverage type automatically)

Installation

$ npm i @nullcc/unicov

Usage

Parsing single coverage in a specific type coverage:

import { Unicov } from '@nullcc/unicov';

const unicov = await Unicov.fromCoverage('./coverage.json', 'istanbul');
const commonCoverage = unicov.getCoverageData();

// using commonCoverage...

Parsing multi coverages in a specific coverage format:

import { Unicov } from '@nullcc/unicov';

const coverageFiles = [
  './json-coverage1.json',
  './json-coverage2.json',
  './json-coverage3.json'
];
const unicov = await Unicov.fromCoverages(coverageFiles, 'istanbul');
const commonCoverage = unicov.getCoverageData();

// using commonCoverage...

Parsing multi coverages automatically:

import { Unicov } from '@nullcc/unicov';

const coverageFiles = [
  './istanbul-coverage.json',
  './jacoco-empty-cobertura-coverage.xml',
  './cobertura-empty-cobertura-coverage.xml',
  './xccov-empty-cobertura-coverage.xml'
];

const unicov = await Unicov.fromCoverages(coverageFiles, 'auto');
const commonCoverage = unicov.getCoverageData();

// using commonCoverage...

Publish

$ npm publish --access public

FAQs

Last updated on 06 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc