-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 846 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 846 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
MOCHA?=./node_modules/.bin/mocha
MOCHA_REPORTER?=spec
MOCHA_FLAGS=--reporter $(MOCHA_REPORTER) --colors --bail
ISTANBUL?=./node_modules/.bin/istanbul
# Files to test
TESTS=$(shell find test/unit/ -name "*.js")
test:
@NODE_ENV="test" \
env NODE_PORT=8004 \
$(MOCHA) $(shell find ./test -name "*-test.js") $(MOCHA_FLAGS)
one:
@NODE_ENV="test" \
env NODE_PORT=8004 \
$(MOCHA) $(NAME) $(MOCHA_FLAGS)
unit:
@NODE_ENV="test" \
env NODE_PORT=8004 \
$(MOCHA) $(shell find ./test/unit -name "*.js") $(MOCHA_FLAGS)
integration:
@NODE_ENV="test" \
env NODE_PORT=8004 \
$(MOCHA) $(shell find ./test/integration -name "*-test.js") $(MOCHA_FLAGS)
acceptance:
@NODE_ENV="test" \
env NODE_PORT=8004 \
$(MOCHA) $(shell find ./test/acceptance -name "*-test.js") $(MOCHA_FLAGS)
cov:
$(ISTANBUL) cover _mocha -- $(TESTS) -R spec
.PHONY: test