Permalink
Browse files

Add coverage test for iservice

  • Loading branch information...
1 parent cab78e2 commit 70edbe9fa44679edd819f145c608bc8c1e0bec15 @aleafs aleafs committed Jul 9, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +7 −0 Makefile
  3. +2 −1 package.json
View
1 .gitignore
@@ -1,3 +1,4 @@
+coverage.html
log
run
node_modules
View
7 Makefile
@@ -1,6 +1,13 @@
+JSCOVERAGE = ./node_modules/visionmedia-jscoverage/jscoverage
test:
@npm install
@./node_modules/mocha/bin/mocha --reporter spec --timeout 2000 test/*.js
+cov:
+ @npm install
+ -mv lib lib.bak && $(JSCOVERAGE) lib.bak lib
+ -./node_modules/mocha/bin/mocha --reporter html-cov --timeout 2000 --ignore-leaks test/*.js > ./coverage.html
+ -rm -rf lib && mv lib.bak lib
+
.PHONY: test
View
3 package.json
@@ -13,7 +13,8 @@
},
"devDependencies": {
"should" : ">=0.4.2",
- "mocha" : ">=0.9.0"
+ "mocha" : ">=0.9.0",
+ "visionmedia-jscoverage" : ">=1.0.0"
},
"main" : "./index.js",
"scripts": {

0 comments on commit 70edbe9

Please sign in to comment.