-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathMakefile
35 lines (27 loc) · 845 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
31
32
33
34
35
TIMEOUT = 3000
MOCHA = ./node_modules/.bin/_mocha
MOCHA_OPTIONS = -t $(TIMEOUT) --recursive -r ./test/util/common.js --exit
ISTANBUL = ./node_modules/.bin/istanbul
COVERALLS = ./node_modules/coveralls/bin/coveralls.js
clean:
@rm -rf node_modules
install:
@npm install -d --registry=https://registry.npmmirror.com/
debug-test:
@NODE_ENV=test DEBUG=toshihiko:* $(MOCHA) -t $(TIMEOUT) --recursive
test:
@NODE_ENV=test $(MOCHA) $(MOCHA_OPTIONS)
coverage:
@NODE_ENV=test $(ISTANBUL) cover $(MOCHA) -- $(MOCHA_OPTIONS)
before-test-travis: install
@mysql -e 'create database toshihiko;' & \
memcached -p 11211 -d
test-coveralls: install
NODE_ENV=test $(ISTANBUL) cover $(MOCHA) \
--report lcovonly \
-- \
$(MOCHA_OPTIONS) \
-R spec && cat ./coverage/lcov.info | \
\
$(COVERALLS) && rm -rf ./coverage
.PHONY: test coverage