thinkjs/Makefile
2014-07-22 15:15:56 +08:00

25 lines
516 B
Makefile

TESTS = test/test/*.js
REPORTER = spec
TIMEOUT = 10000
MOCHA_OPTS =
ISTANBUL = ./node_modules/.bin/istanbul
MOCHA = ./node_modules/mocha/bin/_mocha
install:
@npm install
test: install
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
@NODE_ENV=test ./node_modules/jshint/bin/jshint lib/
test-cov:
@$(ISTANBUL) cover --report html $(MOCHA) -- -t $(TIMEOUT) -R spec $(TESTS)
test-all: test test-cov
.PHONY: test-cov test test-all