-
Notifications
You must be signed in to change notification settings - Fork 83
/
Makefile
45 lines (36 loc) · 876 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
41
42
43
44
45
REPORTER = spec
MOCHA = ./node_modules/.bin/mocha
SAILS = ./node_modules/.bin/sails
WATERLOCK = ./node_modules/.bin/waterlock
JSHINT = ./node_modules/.bin/jshint
ISTANBUL = ./node_modules/.bin/istanbul
TESTAPP = _testapp
ifeq (true,$(COVERAGE))
test: jshint coverage
else
test: jshint base
endif
base:
@echo "running mocha tests..."
@NODE_ENV=test $(MOCHA) \
--colors \
--reporter $(REPORTER) \
--recursive \
coveralls:
@echo "running mocha tests with coveralls..."
@NODE_ENV=test $(ISTANBUL) \
cover ./node_modules/mocha/bin/_mocha \
--report lcovonly \
-- -R $(REPORTER) \
--recursive && \
cat ./coverage/lcov.info |\
./node_modules/coveralls/bin/coveralls.js && \
rm -rf ./coverage
jshint:
@echo "running lint..."
$(JSHINT) lib
clean:
@echo "clean..."
rm -rf $(TESTAPP)
coverage: coveralls
.PHONY: test base coveralls coverage provision