Skip to content

Commit

Permalink
move to istanbul for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Mar 26, 2014
1 parent 8ee578e commit 9de2db1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,6 +1,6 @@
node_modules
lib-cov
coverage.html
components
coverage
npm-debug.log
*.tgz
*.patch
Expand Down
20 changes: 20 additions & 0 deletions .jshintrc
@@ -0,0 +1,20 @@
{
"curly": false,
"eqeqeq": true,
"unused": true,
"undef": true,
"esnext": true,
"laxbreak": true,
"smarttabs": true,
"node": true,
"browser": true,
"expr": true,
"globals" : {
"describe" : false,
"it" : false,
"before" : false,
"beforeEach" : false,
"after" : false,
"afterEach" : false
}
}
4 changes: 2 additions & 2 deletions .npmignore
@@ -1,6 +1,6 @@
node_modules
lib-cov
coverage.html
components
coverage
npm-debug.log
*.tgz
*.patch
Expand Down
21 changes: 8 additions & 13 deletions Makefile
@@ -1,16 +1,11 @@
test:
NODE_ENV=test ./node_modules/.bin/mocha --harmony
test: lint
NODE_ENV=test node --harmony ./node_modules/.bin/istanbul cover \
./node_modules/mocha/bin/_mocha

lib-cov: clean-cov
./node_modules/.bin/jscoverage lib lib-cov
lint:
-./node_modules/.bin/jshint ./test ./lib ./index.js

clean-cov:
rm -rf lib-cov
test-coveralls: test
-cat ./coverage/lcov.info | ./node_modules/.bin/coveralls

test-cov: lib-cov
ANALYSES_COV=1 NODE_ENV=test ./node_modules/.bin/mocha --harmony --reporter html-cov 1> coverage.html

test-coveralls: lib-cov
ANALYSES_COV=1 NODE_ENV=test ./node_modules/.bin/mocha --harmony --reporter mocha-lcov-reporter | ./node_modules/.bin/coveralls

.PHONY: test test-cov test-coveralls clean-cov
.PHONY: test lint test-coveralls
8 changes: 5 additions & 3 deletions index.js
@@ -1,3 +1,5 @@
module.exports = process.env.ANALYSES_COV
? require('./lib-cov')
: require('./lib');
/* vim: set shiftwidth=2 tabstop=2 noexpandtab textwidth=80 wrap : */
"use strict";

module.exports = require('./lib');

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -17,14 +17,14 @@
"devDependencies": {
"esprima": "~ 1.0",
"esgraph": "~ 0.1.1",
"istanbul": "*",
"mocha": "*",
"should": "*",
"jscoverage": "*",
"coveralls": "*",
"mocha-lcov-reporter": "*"
"jshint": "*"
},
"scripts": {
"test": "make test && make test-coveralls"
"test": "make test-coveralls"
},
"repository": "git://github.com/Swatinem/analyses.git",
"license": "LGPLv3"
Expand Down

0 comments on commit 9de2db1

Please sign in to comment.