Permalink
Browse files

added test coverage

  • Loading branch information...
1 parent fa8e3ce commit 2160f6160a680ba067879035d40cd0d3b1131e45 @matthewmueller matthewmueller committed Sep 24, 2012
Showing with 20 additions and 5 deletions.
  1. +5 −2 .gitignore
  2. +3 −1 .npmignore
  3. +9 −1 Makefile
  4. +3 −1 index.js
View
@@ -1,4 +1,7 @@
node_modules
npm-debug.log
-tests/rendering/diffs/*
-tests_old
+coverage.html
+.DS_Store
+lib-cov
+.coverage_data
+cover_html
View
@@ -3,4 +3,6 @@ support/
tests/
examples/
*.sock
-*.tmproj
+*.tmproj
+coverage.html
+lib-cov
View
@@ -1,7 +1,15 @@
+REPORTER = dot
+
test:
- @./node_modules/mocha/bin/mocha --reporter dot
+ @./node_modules/mocha/bin/mocha --reporter $(REPORTER)
subl:
@subl lib/ test/ package.json index.js
+test-cov: lib-cov
+ @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
+
+lib-cov:
+ @jscoverage lib lib-cov
+
.PHONY: test build subl
View
@@ -1,6 +1,8 @@
var fs = require('fs');
-exports = module.exports = require('./lib/cheerio');
+exports = module.exports = process.env.EXPRESS_COV
+ ? require('./lib-cov/cheerio')
+ : require('./lib/cheerio');
/*
Export the version

0 comments on commit 2160f61

Please sign in to comment.