Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

istanbul-reports

Package Overview
Dependencies
Maintainers
5
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul-reports

istanbul reports

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is istanbul-reports?

The istanbul-reports npm package is used for generating coverage reports in various formats from Istanbul coverage JSON objects. Istanbul is a JavaScript code coverage tool that computes statement, line, function, and branch coverage with module loader hooks to work seamlessly with the code. The reports generated by istanbul-reports can be in HTML, text, text-summary, lcov, and more, which are useful for visualizing and understanding the code coverage of a project.

What are istanbul-reports's main functionalities?

HTML Report Generation

Generates a detailed HTML report that visualizes code coverage with syntax highlighting, directory views, and file views.

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

// Assuming you have a coverageMap object
const context = libReport.createContext({
  dir: 'coverage', // output directory
  coverageMap: coverageMap
});

const report = reports.create('html', {
  // any options here
});

report.execute(context);

Text Report Generation

Produces a simple text report that summarizes the coverage metrics, which can be output to the console or a file.

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

// Assuming you have a coverageMap object
const context = libReport.createContext({
  dir: 'coverage', // output directory
  coverageMap: coverageMap
});

const report = reports.create('text');

report.execute(context);

LCOV Report Generation

Creates an lcov report that is compatible with tools that accept the lcov format, such as coveralls.io.

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

// Assuming you have a coverageMap object
const context = libReport.createContext({
  dir: 'coverage', // output directory
  coverageMap: coverageMap
});

const report = reports.create('lcovonly');

report.execute(context);

Other packages similar to istanbul-reports

Keywords

FAQs

Package last updated on 30 Nov 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc