istanbul-coveralls

2019-01-13 admin

istanbul-coveralls是什么

什么是istanbul-coveralls,A simple alias for istanbul + coveralls

istanbul-coveralls使用教程帮助文档

istanbul-coveralls

NPM version Build Status Coverage Status Dependency Status devDependency Status

A simple alias for istanbul + node-coveralls

istanbul cover test.js && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage

istanbul cover test.js && istanbul-coveralls

Installation

Use npm.

npm install --save-dev istanbul istanbul-coveralls

Usage

  1. Write a coverage information file under ./coverage by using istanbul cover command or the API of istanbul.
  2. Run istanbul-coveralls command. See the docs of node-coveralls for more information about its usage.

Option

--no-rm

By default, it removes ./coverage after coverage reporting. If --no-rm flag is enabled, it doesn’t remove the directory.

istanbul cover test.js && istanbul-coveralls --no-rm

Example

Mocha

istanbul cover ./node_modules/.bin/_mocha && ./node_modules/.bin/istanbul-coveralls

If you run the test as a npm script, you can omit directory names from the command.

istanbul cover _mocha && istanbul-coveralls

License

Copyright © 2014 - 2016 Shinnosuke Watanabe

Licensed under the MIT LIcense.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-50869.html

文章标题:istanbul-coveralls

回到顶部