Permalink
Browse files

Added `make test-cov`

  • Loading branch information...
1 parent 01178dd commit 69fe85f146fe0bf1cbc60685987d383c39e7db70 TJ Holowaychuk committed Mar 22, 2012
Showing with 15 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +3 −0 .npmignore
  3. +7 −1 Makefile
  4. +3 −1 index.js
View
@@ -3,3 +3,5 @@ lib-cov
testing
.DS_Store
node_modules
+coverage.html
+lib-cov
View
@@ -11,3 +11,6 @@ docs/
editors/
examples/
test/
+
+coverage.html
+lib-cov
View
@@ -10,6 +10,12 @@ test:
--bail \
--reporter $(REPORTER)
+test-cov: lib-cov
+ STYLUS_COV=1 $(MAKE) REPORTER=html-cov > coverage.html
+
+lib-cov: lib
+ jscoverage $< $@
+
install-bundle:
cp -fr $(TM_BUNDLE) $(TM_BUNDLE_DEST)
@@ -19,4 +25,4 @@ update-bundle:
benchmark:
@node bm.js
-.PHONY: test install-bundle update-bundle benchmark
+.PHONY: test install-bundle update-bundle benchmark test-cov
View
@@ -1,2 +1,4 @@
-module.exports = require('./lib/stylus');
+module.exports = process.env.STYLUS_COV
+ ? require('./lib-cov/stylus')
+ : require('./lib/stylus');

0 comments on commit 69fe85f

Please sign in to comment.