-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathMakefile
52 lines (44 loc) · 1.04 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
TESTS = test/*.test.js
REPORTER = tap
TIMEOUT = 3000
MOCHA_OPTS =
install:
@npm install
build:
@NODE_ENV=production ./node_modules/babel-cli/bin/babel.js -d lib/ src/
test:
make build;
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--require babel-core/register \
$(MOCHA_OPTS) \
$(TESTS)
test-cov:
make build;
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--require babel-core/register \
$(MOCHA_OPTS) \
$(TESTS)
test-travis:
make build;
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--require babel-core/register \
$(MOCHA_OPTS) \
$(TESTS)
autod:
@./node_modules/.bin/autod -w -e example --prefix=~ --keep=supertest,debug, --semver=koa@1
@$(MAKE) install
.PHONY: test