Skip to content

Commit

Permalink
added test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Sep 24, 2012
1 parent fa8e3ce commit 2160f61
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .gitignore
@@ -1,4 +1,7 @@
node_modules node_modules
npm-debug.log npm-debug.log
tests/rendering/diffs/* coverage.html
tests_old .DS_Store
lib-cov
.coverage_data
cover_html
4 changes: 3 additions & 1 deletion .npmignore
Expand Up @@ -3,4 +3,6 @@ support/
tests/ tests/
examples/ examples/
*.sock *.sock
*.tmproj *.tmproj
coverage.html
lib-cov
10 changes: 9 additions & 1 deletion Makefile
@@ -1,7 +1,15 @@
REPORTER = dot

test: test:
@./node_modules/mocha/bin/mocha --reporter dot @./node_modules/mocha/bin/mocha --reporter $(REPORTER)


subl: subl:
@subl lib/ test/ package.json index.js @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 .PHONY: test build subl
4 changes: 3 additions & 1 deletion index.js
@@ -1,6 +1,8 @@
var fs = require('fs'); 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 Export the version
Expand Down

0 comments on commit 2160f61

Please sign in to comment.