forked from pkgcloud/pkgcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (21 loc) · 893 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
MOCHA_CMD = MOCK=on ./node_modules/.bin/mocha
MOCHA_OPTS = --require blanket -t 4000 test/*/*/*-test.js test/*/*/*/*-test.js
DEFAULT_REPORT_OPTS = --reporter spec
HTML_REPORT_OPTS = --reporter html-cov > coverage.html
COVERALLS_REPORT_OPTS = --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
check: test
test: test-unit
cov: test-cov-html
travis: lint test-unit test-cov-coveralls
test-unit:
@echo "$(MOCHA_CMD) $(MOCHA_OPTS) $(REPORT_OPTS)"
@NODE_ENV=test $(MOCHA_CMD) $(MOCHA_OPTS) $(REPORT_OPTS)
test-cov-html:
@echo "$(MOCHA_CMD) $(MOCHA_OPTS) $(HTML_REPORT_OPTS)"
@NODE_ENV=test $(MOCHA_CMD) $(MOCHA_OPTS) $(HTML_REPORT_OPTS)
test-cov-coveralls:
@echo "$(MOCHA_CMD) $(MOCHA_OPTS) $(COVERALLS_REPORT_OPTS)"
@NODE_ENV=test $(MOCHA_CMD) $(MOCHA_OPTS) $(COVERALLS_REPORT_OPTS)
lint:
./node_modules/.bin/jshint --exclude-path .gitignore .
.PHONY: test