Skip to content

Commit

Permalink
Merge pull request #130 from shtylman/coverage
Browse files Browse the repository at this point in the history
use istanbul for code coverage
  • Loading branch information
rauchg committed Mar 13, 2013
2 parents c8bc1d4 + 0389b0c commit cc77809
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.DS_Store
build
components
/coverage
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ test:
--reporter $(REPORTER) \
$(TESTS)

test-cov:
@./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \
--require ./test/common \
--reporter $(REPORTER) \
$(TESTS)

test-browser:
@./node_modules/.bin/serve test/

Expand Down
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

module.exports = process.env.EIO_COV
? require('./lib-cov/')
: require('./lib/');
module.exports = require('./lib/');
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"devDependencies": {
"mocha": "*",
"serve": "*",
"expect.js": "*"
"expect.js": "*",
"istanbul": "*"
},
"component": {
"scripts": {
Expand Down

0 comments on commit cc77809

Please sign in to comment.