-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
38 lines (30 loc) · 908 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
BIN = ./node_modules/.bin
MOCHA_OPTS = --timeout 2000
REPORTER = spec
TEST_FILES = test/*.js
TEST_INTEGRATION_FILES = test/integration/*.js
BIN = ./node_modules/.bin
lint:
$(BIN)/jshint lib/* test/* --config .jshintrc
test: lint
$(BIN)/mocha \
$(MOCHA_OPTS) \
--reporter $(REPORTER) \
$(TEST)
test-integration: lint
$(BIN)/mocha \
$(MOCHA_OPTS) \
--reporter $(REPORTER) \
$(TEST_INTEGRATION_FILES)
test-ci:
$(MAKE) -k test MOCHA_OPTS="$(MOCHA_OPTS) --watch --growl" REPORTER="min"
lib-cov:
[ -d "lib-cov" ] && rm -rf lib-cov || true
$(BIN)/istanbul instrument --output lib-cov --no-compact --variable global.__coverage__ lib
test-cov: lib-cov
@LOG4JS_COV=1 $(MAKE) test "REPORTER=mocha-istanbul" ISTANBUL_REPORTERS=text-summary,html
clean:
[ -d "lib-cov" ] && rm -rf lib-cov || true
[ -d "reports" ] && rm -rf reports || true
[ -d "build" ] && rm -rf build || true
.PHONY: test