Skip to content

Commit

Permalink
Integrated code coverage with coveralls.
Browse files Browse the repository at this point in the history
  • Loading branch information
jalleyne committed May 1, 2015
1 parent 2f62346 commit f228227
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
.DS_Store
.coveralls.yml
node_modules/
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -5,4 +5,4 @@ node_js:
- "1.0"
- "1.6"
sudo: false
script: "npm test"
script: "npm run test-cov"
11 changes: 9 additions & 2 deletions Makefile
Expand Up @@ -7,7 +7,14 @@ docs:
lib/*.js

test:
@./node_modules/.bin/mocha \
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER)

.PHONY: all test docs
test-cov:
@NODE_ENV=test ./node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha --report lcovonly -- \
-R $(REPORTER) && cat ./coverage/lcov.info | \
./node_modules/coveralls/bin/coveralls.js && \
rm -rf ./coverage

.PHONY: all test test-cov docs
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -6,6 +6,7 @@ Express.js middleware abstracting error vs success responses.
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]

### INSTALLING

Expand Down Expand Up @@ -257,3 +258,5 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[downloads-url]: https://npmjs.org/package/express-responder
[travis-image]: https://img.shields.io/travis/bigmountainideas/express-responder/master.svg
[travis-url]: https://travis-ci.org/bigmountainideas/express-responder
[coveralls-image]: https://coveralls.io/repos/bigmountainideas/express-responder/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/r/bigmountainideas/express-responder?branch=master
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -4,7 +4,8 @@
"description": "Express.js middleware abstracting error vs success responses.",
"main": "index.js",
"scripts": {
"test": "make test"
"test": "make test",
"test-cov": "make test-cov"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,7 +35,8 @@
"body-parser": "^1.12.3",
"coveralls": "^2.11.2",
"mocha-lcov-reporter": "0.0.2",
"jade": "^1.9.2"
"jade": "^1.9.2",
"istanbul": "^0.3.13"
},
"dependencies": {
"errors": "^0.2.0",
Expand Down

0 comments on commit f228227

Please sign in to comment.