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

incremental-coverage

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

incremental-coverage

![](https://img.shields.io/github/license/matmanjs/incremental-coverage) ![](https://img.shields.io/github/languages/code-size/matmanjs/incremental-coverage)

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
121
decreased by-47.16%
Maintainers
2
Weekly downloads
 
Created
Source

Incremental Coverage

本应用结合 lcov.infoGit Diff 得到仓库的增量覆盖率数据。

  • 快速开始-快速得到一份测试报告
  • API-介绍暴露出来的 API 与配置选项

Incremental Coverage 适用于 macOS、Windows 和 Linux。

如果 Incremental Coverage 不能正常工作,请提交 issue

Quick Start

安装

可以通过 NPM 或者 Yarn 进行安装。

$ npm install -g incremental-coverage
# or
$ yarn add global incremental-coverage

使用

我们通过一个简单的命令行工具来展示如何使用(必须在 Git 仓库根目录中运行,且指定 lcov 文件)。

$ incremental-coverage -p="./.dwt_output/e2e/coverage/lcov.info" -t="2020-06-01"
  • 上面这条命令指定 ./.dwt_output/e2e/coverage/lcov.info 覆盖率文件
  • 并且指定了 2020-06-01 增量起始时间
  • 运行这个命令将会在根目录输出一个 output.json 文件,文件示例如下:
{
  "total": { "increLine": 2, "covLine": 2, "increRate": "100.00%" },
  "files": [
    {
      "increLine": 2,
      "covLine": 2,
      "increRate": "100.00%",
      "detail": [
        { "number": 5, "hits": 73 },
        { "number": 71, "hits": 45 }
      ],
      "name": "/src/datas/action.js"
    }
  ]
}

total 为增量覆盖率的总情况,files 中是各个文件的详细情况。

API

提供 命令行Node.js 调用两种形式

License

Incremental Coverage 使用 MIT 开源协议

FAQs

Package last updated on 12 Aug 2020

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