Skip to content

Commit

Permalink
added coverage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
logicalparadox committed Mar 14, 2012
1 parent 73439d2 commit 4d35415
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
*.swp
lib-cov
coverage.html
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git/
lib-cov/
coverage.html
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ test:
--reporter $(REPORTER) \
$(TESTS)

test-cov: lib-cov
@SEEDREDIS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html

lib-cov:
@rm -rf lib-cov
@jscoverage lib lib-cov

bench:
@NODE_ENV=benchmark ./node_modules/.bin/matcha \
$(BENCHMARKS)

.PHONY: test benchmark
.PHONY: test test-cov lib-cov benchmark
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./lib/seed-redis');
module.exports = process.env.SEEDREDIS_COV
? require('./lib-cov/seed-redis')
: require('./lib/seed-redis');

0 comments on commit 4d35415

Please sign in to comment.