🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@gaoding/egg-inspector

Package Overview
Dependencies
Maintainers
22
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaoding/egg-inspector

[npm-image]: https://img.shields.io/npm/v/egg-inspector.svg?style=flat-square [npm-url]: https://npmjs.org/package/egg-inspector [travis-image]: https://img.shields.io/travis/eggjs/egg-inspector.svg?style=flat-square [travis-url]: https://travis-ci.org/eg

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
22
Created
Source

egg-inspector

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

Install

$ npm i @gaoding/egg-inspector --save

Usage

// {app_root}/config/plugin.js
exports.inspector = {
  enable: true,
  package: '@gaoding/egg-inspector',
};

Configuration

// {app_root}/config/config.default.js
exports.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 目录下。

License

MIT

Keywords

egg

FAQs

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