From faf7883d3b3a4d12e62d730d81c1fcbade0c7bfd Mon Sep 17 00:00:00 2001 From: Jarid Margolin Date: Tue, 1 Nov 2016 12:20:49 -0400 Subject: [PATCH] Add coverage report using istanbul/coveralls. --- .gitignore | 3 ++- .travis.yml | 3 +++ README.md | 2 +- package.json | 6 +++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e9ade41..786b321 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ runners tmp /dist -/docs \ No newline at end of file +/docs +/coverage \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6aefd41..8fe949d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,6 @@ before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 # give xvfb some time to start + +after_success: + - npm run coveralls diff --git a/README.md b/README.md index ad43bc4..a381b3a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# inspect-process [![Build Status](https://travis-ci.org/jaridmargolin/inspect-process.png)](https://travis-ci.org/jaridmargolin/inspect-process) +# inspect-process [![Build Status](https://travis-ci.org/jaridmargolin/inspect-process.png)](https://travis-ci.org/jaridmargolin/inspect-process) [![Coverage Status](https://coveralls.io/repos/github/jaridmargolin/inspect-process/badge.svg?branch=master)](https://coveralls.io/github/jaridmargolin/inspect-process?branch=master) Dead simple debugging for node.js using chrome-devtools. diff --git a/package.json b/package.json index 31419f6..f0b94fc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "inspect": "bin/inspect.js" }, "scripts": { - "test": "mocha --no-timeouts" + "test": "mocha --no-timeouts", + "coverage": "istanbul cover ./node_modules/.bin/_mocha -- --no-timeouts", + "coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls" }, "dependencies": { "chromedriver": "^2.24.1", @@ -29,6 +31,8 @@ }, "devDependencies": { "chai": "^3.5.0", + "coveralls": "^2.11.14", + "istanbul": "^0.4.5", "mocha": "^3.1.2", "test-console": "^1.0.0" }