Socket
Book a DemoInstallSign in
Socket

@bizantine/report-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bizantine/report-generator

1.0.1
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@Bizantine/report-generator

Introduction

The library generates a JavaScript code coverage report for modified files by comparing them with git-diff information, and presents the report in the istanbul.js (also known as nyc) HTML format.

Usage

API - genReport

const { genReport } = require('@bizantine/report-generator')

genReport({
          coverageOb: coverage, // such as { 'file.js': b: {0: [1, 0]}, branchMap: {0: {loc: {start: {line: 1, column: 4 ...}}}}}
          targetPath: somewhere, // path generate file to, relative or absolute path
          gitDiff: diff,  // such as '$git diff hash1 hash2' log messages 
          otherCoverageOb: oldCoverRawData// other coverage data expected be merged
        }).then((coverRawData)=>{
            //  store this coverRawData for merge other data in the future, this coverRawData is already mapped by inputSouceMap
        })

genReport function generate code coverage report in HTML format at targetPath

  • coverageOb : an object build by @bizantine/babel-plugin
  • targetPath : the report file path
  • gitDiff : git diff log messages
  • otherCoverageOb : other coverage data expected be merged to coverageOb

Sample Code

FAQs

Package last updated on 22 Sep 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.