Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.DS_Store | ||
.coveralls.yml | ||
coverage/ | ||
node_modules/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters