@gaoding/egg-inspector
v1.0.7
Published
[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
Downloads
4
Readme
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
目录下。