-
Notifications
You must be signed in to change notification settings - Fork 118
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
11 changed files
with
991 additions
and
703 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 |
---|---|---|
|
@@ -12,4 +12,6 @@ logs | |
results | ||
|
||
node_modules | ||
npm-debug.log | ||
npm-debug.log | ||
|
||
coverage/ |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ lib-cov/ | |
Makefile | ||
.travis.yml | ||
logo.png | ||
coverage/ |
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,5 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' | ||
- '0.8' | ||
script: make test-coveralls | ||
- "0.11" | ||
script: "make test-travis" | ||
after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls" |
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,28 +1,36 @@ | ||
TESTS = test/*.test.js | ||
REPORTER = spec | ||
TIMEOUT = 1000 | ||
REPORTER = tap | ||
TIMEOUT = 3000 | ||
MOCHA_OPTS = | ||
|
||
install: | ||
@npm install | ||
@npm install --registry=http://registry.npm.taobao.org | ||
|
||
test: install | ||
@NODE_ENV=test ./node_modules/mocha/bin/mocha \ | ||
test: | ||
@NODE_ENV=test ./node_modules/mocha/bin/mocha\ | ||
--reporter $(REPORTER) \ | ||
--timeout $(TIMEOUT) \ | ||
--require should \ | ||
$(MOCHA_OPTS) \ | ||
$(TESTS) | ||
|
||
test-cov: | ||
@rm -f coverage.html | ||
@$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov > coverage.html | ||
@$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=travis-cov | ||
@ls -lh coverage.html | ||
@NODE_ENV=test node \ | ||
node_modules/.bin/istanbul cover \ | ||
./node_modules/.bin/_mocha \ | ||
-- -u exports \ | ||
--require should \ | ||
$(TESTS) \ | ||
--bail | ||
|
||
test-coveralls: test | ||
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID) | ||
@-$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js | ||
|
||
test-all: test test-cov | ||
test-travis: | ||
@NODE_ENV=test node \ | ||
node_modules/.bin/istanbul cover \ | ||
./node_modules/.bin/_mocha \ | ||
--report lcovonly \ | ||
-- -u exports \ | ||
--require should \ | ||
$(TESTS) \ | ||
--bail | ||
|
||
.PHONY: test |
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
Oops, something went wrong.