浏览器- 斯坦布尔
A 类 浏览器 用于 伊斯坦布尔语name 代码覆盖工具.
这是一个临时叉,包括 维基月球在线解说-斯坦布尔#45 直到它降落在上游.
安装
npm install --save-dev @airtap/browserify-istanbul
使用量
注册浏览器转换有几种方法: 在命令行中, 在您的 package.json,或者使用浏览器实现 API.
您可以使用浏览器- Stanbul 浏览文件 需要更多信息.
在 JavaScript 中使用浏览器- istanbul 有几种选项可用 。 其代码如下:
var istanbul = require('@airtap/browserify-istanbul');
// use without any options...
browserifyBundle.transform(istanbul);
// or with some options...
browserifyBundle.transform(istanbul({
// ignore these glob paths (the ones shown are the defaults)
ignore: ['**/node_modules/**', '**/bower_components/**', '**/test/**', '**/tests/**', '**/*.json'],
// by default, any paths you include in the ignore option are ignored
// in addition to the defaults. set the defaultIgnore option to false
// to only ignore the paths you specify.
defaultIgnore: true
}));
命令行
- 无选项 :
./node_modules/.bin/browserify -t @airtap/browserify-istanbul test/test-*.js -o bundle.js
- 有选项
./node_modules/.bin/browserify -t [ @airtap/browserify-istanbul --ignore "**/bower_components/**" ] test/test-*.js -o bundle.js
与覆盖报告互动
装入和操纵覆盖报告,命令行工具 无 可用于:
- 输出
__coverage__对象./.nyc_output/coverage.json。 。 。 .
- 使用库来方便 摩查-幻觉-斯坦布尔。 。 。 .
- 使用列表执行 nyc 记者。 。 。 .
nyc report --reporter=lcov --reporter=text-summary。 。 。 .
见 http://tanbul.js.org (中文(简体) ) 需要更多的实例和文件.
许可证
麻省理工学院