Skip to content

Commit

Permalink
Use Istanbul for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcg committed Mar 24, 2014
1 parent 15ae9cb commit 0d2effa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
.DS_Store
.coveralls.yml
coverage/
node_modules/
build/
50 changes: 20 additions & 30 deletions Makefile
@@ -1,42 +1,32 @@
test: lib test/lib node_modules
TEST_LIB_PATH="../../lib" ./node_modules/.bin/mocha \
--recursive \
--reporter dot \
TEST_LIB_PATH="../../lib" ./node_modules/.bin/_mocha \
--timeout 3000 \
--reporter spec \
--check-leaks \
--ui tdd

test-coveralls: build/lib-coverage test/lib node_modules
TEST_LIB_PATH="../../build/lib-coverage" ./node_modules/.bin/mocha \
--recursive \
--reporter mocha-lcov-reporter \
--ui tdd | \
./node_modules/coveralls/bin/coveralls.js
--ui tdd \
--recursive

test-cov: build/coverage.html
test-coverage: lib test/lib node_modules
TEST_LIB_PATH="../../lib" ./node_modules/.bin/istanbul \
cover ./node_modules/.bin/_mocha \
-- \
--timeout 3000 \
--reporter spec \
--check-leaks \
--ui tdd \
--recursive

build/coverage.html: build/lib-coverage test/lib node_modules
TEST_LIB_PATH="../../build/lib-coverage" ./node_modules/.bin/mocha \
--recursive \
--reporter html-cov \
--ui tdd \
> $@
view-coverage: test-coverage
open coverage/lcov-report/index.html

build/lib-coverage: build lib node_modules
./node_modules/.bin/jscoverage \
--no-highlight \
lib \
build/lib-coverage
test-coveralls: test-coverage
cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

node_modules: package.json
npm install
touch $@

build:
if [ ! -d $@ ]; then \
mkdir $@; \
fi;

clean:
rm -rf build
rm -rf coverage

.PHONY: test test-cov test-coveralls clean
.PHONY: test test-coverage test-coveralls view-coverage clean
9 changes: 4 additions & 5 deletions package.json
Expand Up @@ -33,12 +33,11 @@
"multilingualization"
],
"dependencies": {
"language-subtag-registry": "~0.3.0"
"language-subtag-registry": "~0.3.2"
},
"devDependencies": {
"jscoverage": "~0.3.8",
"mocha": "~1.17.1",
"mocha-lcov-reporter" : "~0.0.1",
"coveralls": "~2.6.1"
"mocha": "~1.18.2",
"istanbul": "~0.2.6",
"coveralls": "~2.10.0"
}
}

0 comments on commit 0d2effa

Please sign in to comment.