Created
March 13, 2014 09:13
-
-
Save adohe-zz/9524888 to your computer and use it in GitHub Desktop.
A common Makefile used in Node project
This file contains hidden or 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 = test/*.test.js | |
| REPORTER = spec | |
| TIMEOUT = 10000 | |
| MOCHA_OPTS = | |
| install-test: | |
| @NODE_ENV=test npm install | |
| test: install-test | |
| @NODE_ENV=test ./node_modules/.bin/mocha \ | |
| --reporter $(REPORTER) \ | |
| --timeout $(TIMEOUT) \ | |
| $(MOCHA_OPTS) \ | |
| $(TESTS) | |
| test-cov: install-test | |
| @$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov | ./node_modules/.bin/cov | |
| cov: test-cov | |
| test-all: test test-cov | |
| .PHONY: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment