forked from koajs/parameter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (34 loc) · 766 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
36
37
38
39
40
TESTS = test/*.test.js
REPORTER = tap
TIMEOUT = 3000
MOCHA_OPTS =
install:
@npm install --registry=http://registry.npm.taobao.org
test:
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
$(MOCHA_OPTS) \
$(TESTS)
test-cov:
@NODE_ENV=test node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
-- -u exports \
--require should \
$(TESTS) \
--bail
test-travis:
@NODE_ENV=test node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
--require should \
$(TESTS) \
--bail
autod: install
@node_modules/.bin/autod -w --prefix="~"\
-e example \
-D mocha,should,istanbul-harmony
@$(MAKE) install
.PHONY: test