Socket
Socket
Sign inDemoInstall

@types/istanbul-lib-coverage

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/istanbul-lib-coverage

TypeScript definitions for istanbul-lib-coverage


Version published
Weekly downloads
20M
decreased by-17.59%
Maintainers
1
Install size
5.32 kB
Created
Weekly downloads
 

Package description

What is @types/istanbul-lib-coverage?

The @types/istanbul-lib-coverage package provides TypeScript type definitions for istanbul-lib-coverage, which is a library for JavaScript test coverage measurement and reporting. It allows developers to integrate coverage reporting into their TypeScript projects seamlessly, ensuring type safety and enhancing developer productivity.

What are @types/istanbul-lib-coverage's main functionalities?

Creating a Coverage Map

This feature allows you to create a new coverage map, which is a collection of coverage results for various files. The coverage map can then be manipulated or queried to retrieve coverage information.

import { createCoverageMap } from 'istanbul-lib-coverage';
const coverageMap = createCoverageMap();

Adding File Coverage

This feature demonstrates how to add coverage data for a specific file to the coverage map. This is useful for incrementally building up coverage data as tests are run.

import { createCoverageMap } from 'istanbul-lib-coverage';
const coverageMap = createCoverageMap();
coverageMap.addFileCoverage({
  path: 'path/to/file.js',
  statementMap: {},
  fnMap: {},
  branchMap: {},
  s: {},
  f: {},
  b: {}
});

Generating Coverage Summary

This feature shows how to generate a summary of the coverage data contained within a coverage map. The summary provides an overview of coverage metrics such as lines covered, statements covered, etc.

import { createCoverageMap } from 'istanbul-lib-coverage';
const coverageMap = createCoverageMap();
// Assume coverageMap is populated
const summary = coverageMap.getCoverageSummary();

Other packages similar to @types/istanbul-lib-coverage

Readme

Source

Installation

npm install --save @types/istanbul-lib-coverage

Summary

This package contains type definitions for istanbul-lib-coverage (https://istanbul.js.org).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage.

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Jason Cheatham.

FAQs

Last updated on 07 Nov 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