forked from JacksonTian/eventproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 849 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
TESTS = test/test.js
REPORTER = spec
TIMEOUT = 10000
MOCHA_OPTS =
COMPONENT = ./node_modules/.bin/component
build: index.js components
@$(COMPONENT) build --dev
components: component.json
@$(COMPONENT) install --dev
clean:
@rm -rf components build
install-test:
@NODE_ENV=test npm install
test: install-test
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
$(MOCHA_OPTS) \
$(TESTS)
test-cov:
@rm -rf coverage.html
@$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov > coverage.html
@$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=travis-cov
@ls -lh coverage.html
test-all: test test-component test-cov
test-component: build
@./node_modules/.bin/mocha-phantomjs test/test_component.html
test-component-browser:
@open test/test_component.html
.PHONY: clean test