Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Sep 22, 2014
1 parent 348841b commit 4b1a5fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js
node_js:
- '0.11'
- "0.11"
script: "make test-travis"
after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls"
20 changes: 14 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,34 @@ jshint: install
@-./node_modules/.bin/jshint ./

test:
@NODE_ENV=test ./node_modules/.bin/mocha \
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--harmony-generators \
--bail \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
$(MOCHA_OPTS) \
$(TESTS)

test-cov:
@NODE_ENV=test node --harmony-generators \
node_modules/.bin/istanbul cover --preserve-comments \
./node_modules/.bin/_mocha \
@NODE_ENV=test node --harmony \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
$(MOCHA_OPTS) \
$(TESTS)

test-travis:
@NODE_ENV=test node --harmony \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
$(MOCHA_OPTS) \
$(TESTS)
@./node_modules/.bin/alicov coverage

autod:
@./node_modules/.bin/autod $(REGISTRY) -w --prefix="~" -k should
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@ koa-userauth

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Coveralls][coveralls-image]][coveralls-url]
[![David deps][david-image]][david-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[![Gittip][gittip-image]][gittip-url]

[npm-image]: https://img.shields.io/npm/v/koa-userauth.svg?style=flat-square
[npm-url]: http://npmjs.org/package/koa-userauth
[npm-url]: https://npmjs.org/package/koa-userauth
[travis-image]: https://img.shields.io/travis/koajs/userauth.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/userauth
[coveralls-image]: https://img.shields.io/coveralls/koajs/userauth.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/userauth?branch=master
[david-image]: https://img.shields.io/david/koajs/userauth.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/userauth
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.11-red.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/cnpmjs.org.svg?style=flat-square
[download-url]: https://npmjs.org/package/cnpmjs.org
[gittip-image]: https://img.shields.io/gittip/dead-horse.svg?style=flat-square
[gittip-url]: https://www.gittip.com/dead-horse/



`koa` user auth abstraction layer middleware.

## Install
Expand Down

0 comments on commit 4b1a5fe

Please sign in to comment.