Skip to content
This repository
Browse code

Added `make test-cov` support

  • Loading branch information...
commit 3b4aee3d26f57eb197bd5c9889430e9599957c10 1 parent a063302
TJ Holowaychuk authored

Showing 4 changed files with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 0  .gitignore
  2. +2 0  .npmignore
  3. +7 1 Makefile
  4. +3 1 index.js
2  .gitignore
... ... @@ -1,3 +1,5 @@
  1 +lib-cov
  2 +coverage.html
1 3 .DS_Store
2 4 node_modules
3 5 *.sock
2  .npmignore
@@ -2,3 +2,5 @@ support
2 2 test
3 3 examples
4 4 *.sock
  5 +lib-cov
  6 +coverage.html
8 Makefile
@@ -14,6 +14,12 @@ test:
14 14 --growl \
15 15 $(TESTS)
16 16
  17 +test-cov: lib-cov
  18 + SUPERAGENT_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
  19 +
  20 +lib-cov:
  21 + jscoverage lib lib-cov
  22 +
17 23 superagent.js: $(SRC)
18 24 cat $^ > $@
19 25
@@ -33,4 +39,4 @@ test-docs:
33 39 clean:
34 40 rm -f superagent{,.min}.js
35 41
36   -.PHONY: test docs test-docs clean
  42 +.PHONY: test-cov test docs test-docs clean
4 index.js
... ... @@ -1,2 +1,4 @@
1 1
2   -module.exports = require('./lib/node');
  2 +module.exports = process.env.SUPERAGENT_COV
  3 + ? require('./lib-cov/node')
  4 + : require('./lib/node');

0 comments on commit 3b4aee3

Please sign in to comment.
Something went wrong with that request. Please try again.