Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use cover module for test coverage

cover module does not require instrumentation to use.

`make test-cov` as before
  • Loading branch information...
commit 9551eba0ba49163238edc04706a6cdb1fde364fd 1 parent 17b1003
Roman Shtylman authored
Showing with 6 additions and 11 deletions.
  1. +2 −0  .gitignore
  2. +3 −6 Makefile
  3. +0 −4 index.js
  4. +1 −1  package.json
2  .gitignore
View
@@ -15,3 +15,5 @@ docs/*.html
docs/*.json
node_modules
.idea
+cover_html
+.coverage_data
9 Makefile
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
4 index.js
View
@@ -1,4 +0,0 @@
-
-module.exports = process.env.CONNECT_COV
- ? require('./lib-cov/connect')
- : require('./lib/connect');
2  package.json
View
@@ -24,7 +24,7 @@
"jade": "*",
"dox": "*"
},
- "main": "index",
+ "main": "lib/connect",
"engines": {
"node": ">= 0.5.0"
},
Please sign in to comment.
Something went wrong with that request. Please try again.