1
0
mirror of synced 2025-11-06 04:21:11 +08:00

Add: Test coverage badge

This commit is contained in:
surunzi
2017-10-15 14:06:29 +08:00
parent 839f6c7014
commit 5f523535da
4 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
language: node_js
node_js:
- "7"
before_script:
- npm install -g codecov
script:
- npm run ci
- codecov --disable=gcov

View File

@@ -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.

View File

@@ -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",

View File

@@ -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.');