Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

use cover module for test coverage #704

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+6 −11
Split
View
@@ -15,3 +15,5 @@ docs/*.html
docs/*.json
node_modules
.idea
+cover_html
+.coverage_data
View
@@ -15,11 +15,8 @@ test:
docs: $(HTML)
@mv $(HTML) docs
-test-cov: lib-cov
- @CONNECT_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
-
-lib-cov:
- @jscoverage lib $@
+test-cov:
+ @NODE_ENV=test cover run ./node_modules/mocha/bin/_mocha && cover report html
%.html: %.js
$(DOX) < $< | node support/docs > $@
@@ -37,4 +34,4 @@ site: docclean docs
benchmark:
@./support/bench
-.PHONY: test-cov site docs test docclean benchmark
+.PHONY: test-cov site docs test docclean benchmark
View
@@ -1,4 +0,0 @@
-
-module.exports = process.env.CONNECT_COV
- ? require('./lib-cov/connect')
- : require('./lib/connect');
View
@@ -24,7 +24,7 @@
"jade": "*",
"dox": "*"
},
- "main": "index",
+ "main": "lib/connect",
"engines": {
"node": ">= 0.5.0"
},