Created
December 14, 2015 14:30
-
-
Save hackerxian/33f455e17aa700118298 to your computer and use it in GitHub Desktop.
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
TESTS = $(shell ls -S `find test -type f -name "*.test.js" -print`) | |
REPORTER = spec | |
TIMEOUT = 10000 | |
MOCHA_OPTS = | |
install: | |
@tnpm install | |
standard: | |
@node_modules/.bin/standard | |
standard-format: | |
@node_modules/.bin/standard \ | |
--format | |
test: install | |
@NODE_ENV=test ./node_modules/.bin/mocha \ | |
--require should \ | |
--reporter $(REPORTER) \ | |
--timeout $(TIMEOUT) \ | |
$(MOCHA_OPTS) \ | |
$(TESTS) | |
test-cov cov: install | |
@-NODE_ENV=test node \ | |
node_modules/.bin/istanbul cover --preserve-comments \ | |
./node_modules/.bin/_mocha \ | |
-- -u exports \ | |
--require should \ | |
--reporter $(REPORTER) \ | |
--timeout $(TIMEOUT) \ | |
$(MOCHA_OPTS) \ | |
$(TESTS) | |
@-./node_modules/.bin/alicov coverage | |
test-all: install test cov | |
autod: install | |
@./node_modules/.bin/autod -w --prefix="~" \ | |
-D mocha,should,istanbul-harmony,alicov | |
@$(MAKE) install | |
.PHONY: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment