-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 752 Bytes
/
Makefile
File metadata and controls
42 lines (34 loc) · 752 Bytes
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
TESTS = $(shell find test -type f -name "*.js")
REPORTER = spec
TIMEOUT = 10000
MOCHA_OPTS =
install:
@npm install
lint: install
@npm run lint
build:
@npm run build
test: install lint
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
test-cov:
@NODE_ENV=test node \
./node_modules/.bin/istanbul cover \
./node_modules/mocha/bin/_mocha \
-- -u exports \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
test-travis:
@NODE_ENV=test node \
./node_modules/.bin/istanbul cover \
./node_modules/mocha/bin/_mocha \
--report lcovonly \
-- -u exports \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
test-all: test test-cov
.PHONY: test-cov test-travis test-all build