Skip to content

Commit

Permalink
Added mocha test coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 24, 2012
1 parent 533b312 commit b6ee5fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -22,6 +22,12 @@ docs: $(HTMLDOCS)
| cat docs/layout/head.html - docs/layout/foot.html \
> $@

test-cov: lib-cov
@EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html

lib-cov:
@jscoverage lib lib-cov

site:
rm -fr /tmp/docs \
&& cp -fr docs /tmp/docs \
Expand Down
4 changes: 3 additions & 1 deletion index.js
@@ -1,2 +1,4 @@

module.exports = require('./lib/express');
module.exports = process.env.EXPRESS_COV
? require('./lib-cov/express')
: require('./lib/express');

0 comments on commit b6ee5fa

Please sign in to comment.