Socket
Book a DemoInstallSign in
Socket

@gaoding/ergate-inspector

Package Overview
Dependencies
Maintainers
22
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaoding/ergate-inspector

ergate code Coverage

latest
npmnpm
Version
1.0.5
Version published
Maintainers
22
Created
Source

@gaoding/ergate-inspector

ergate 应用运行时代码覆盖率收集插件

Installation

npm install @gaoding/ergate-inspector

yarn add @gaoding/ergate-inspector

Usage

// app.ts
import '@gaoding/ergate-inspector';

// config.[env].ts
config.inspector = {
    exclude?: string[];  // file exclude, default: ['internal/**', 'node_modules/**']
    include?: string[];  // file include, default: ['file:**']

    enable?: boolean;    // enable code coverage inspect?, default: true

    reportHtml?: boolean;// convert dump data to html, default: false
}

插件会注册一个中间件到全局,注册接口事件 GET /coverage-dump, 当访问该接口的时候,会输出代码覆盖文件到 ${project}/coverage 目录下。

Keywords

ergate

FAQs

Package last updated on 27 Aug 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