Permalink
Browse files

added coverage tests

  • Loading branch information...
1 parent 73439d2 commit 4d354157c35393339121e615cdb29b568b5fd50e @logicalparadox logicalparadox committed Mar 14, 2012
Showing with 16 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +3 −0 .npmignore
  3. +8 −1 Makefile
  4. +3 −1 index.js
View
@@ -1,2 +1,4 @@
node_modules/
*.swp
+lib-cov
+coverage.html
View
@@ -0,0 +1,3 @@
+.git/
+lib-cov/
+coverage.html
View
@@ -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
View
@@ -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.