Add: Test coverage badge
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "7"
|
||||
before_script:
|
||||
- npm install -g codecov
|
||||
script:
|
||||
- npm run ci
|
||||
- codecov --disable=gcov
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
[![Join the chat at https://gitter.im/liriliri/eruda][gitter-image]][gitter-url]
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][npm-url]
|
||||
|
||||
[gitter-image]: https://badges.gitter.im/liriliri/eruda.svg
|
||||
@@ -17,6 +18,8 @@
|
||||
[npm-url]: https://npmjs.org/package/eruda
|
||||
[travis-image]: https://img.shields.io/travis/liriliri/eruda.svg
|
||||
[travis-url]: https://travis-ci.org/liriliri/eruda
|
||||
[codecov-image]: https://codecov.io/github/liriliri/eruda/coverage.svg?branch=master
|
||||
[codecov-url]: https://codecov.io/github/liriliri/eruda?branch=master
|
||||
[license-image]: https://img.shields.io/npm/l/eruda.svg
|
||||
|
||||
Console for Mobile Browsers.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "Console for Mobile Browsers",
|
||||
"main": "eruda.js",
|
||||
"scripts": {
|
||||
"ci": "npm run lint && npm run test && npm run build",
|
||||
"ci": "npm run lint && npm run cov && npm run build",
|
||||
"build": "webpack --config script/webpack.dev.js && webpack -p --config script/webpack.release.js",
|
||||
"cov": "npm run test && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -t json && node script/coverage",
|
||||
"dev": "webpack-dev-server --config script/webpack.dev.js --host 0.0.0.0",
|
||||
|
||||
@@ -23,7 +23,7 @@ var coverage = util.reduce(util.keys(remappedJson), function (result, source)
|
||||
|
||||
collector.add(coverage);
|
||||
|
||||
reporter.add('html');
|
||||
reporter.addAll(['html', 'lcov']);
|
||||
reporter.write(collector, true, function ()
|
||||
{
|
||||
console.log('open coverage/index.html to see the coverage report.');
|
||||
|
||||
Reference in New Issue
Block a user