Permalink
Browse files

Added mocha test coverage support

  • Loading branch information...
1 parent 533b312 commit b6ee5fafd0d6c79cf7df5560cb324ebee4fe3a7f @tj tj committed Feb 24, 2012
Showing with 9 additions and 1 deletion.
  1. +6 −0 Makefile
  2. +3 −1 index.js
View
@@ -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 \
View
@@ -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.