Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added mocha test coverage support

  • Loading branch information...
commit b6ee5fafd0d6c79cf7df5560cb324ebee4fe3a7f 1 parent 533b312
TJ Holowaychuk tj authored
Showing with 9 additions and 1 deletion.
  1. +6 −0 Makefile
  2. +3 −1 index.js
6 Makefile
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 \
4 index.js
View
@@ -1,2 +1,4 @@
-module.exports = require('./lib/express');
+module.exports = process.env.EXPRESS_COV
+ ? require('./lib-cov/express')
+ : require('./lib/express');
Please sign in to comment.
Something went wrong with that request. Please try again.