-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (52 loc) · 1.41 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
TESTS = test/**/*.spec.js
INSTANCE_TESTS_DIR = .test-instance
INSTANCE_TESTS = test-app/**/*.spec.js
REPORTER = spec
COVERAGE_REPORT = ./coverage/lcov.info
COVERALLS = ./node_modules/coveralls/bin/coveralls.js
test: test-mocha
test-mocha:
@NODE_ENV=test mocha \
--timeout 200 \
--reporter $(REPORTER) \
$(TESTS)
test-full: istanbul create-app-instance test-app-instance test-node-module
istanbul:
istanbul cover _mocha -- -R spec $(TESTS)
coveralls:
cat $(COVERAGE_REPORT) | $(COVERALLS)
cov-html: test-cov html-cov-report
html-cov-report:
istanbul report html
npm:
npm publish ./
check:
travis-lint .travis.yml
clean:
rm -rf ./coverage
test-app-instance:
istanbul cover _mocha -- -R spec $(INSTANCE_TESTS)
create-app-instance:
rm -rf $(INSTANCE_TESTS_DIR)/
mkdir $(INSTANCE_TESTS_DIR)
npm install -g yo bower
npm link
cd $(INSTANCE_TESTS_DIR) && echo "CDing into $(INSTANCE_TESTS_DIR)" && \
yes | yo moda --skip-install && \
npm install && \
bower install
test-node-module:
rm -rf $(INSTANCE_TESTS_DIR)/
mkdir $(INSTANCE_TESTS_DIR)
npm install -g yo bower generator-moda
cd $(INSTANCE_TESTS_DIR) && echo "CDing into $(INSTANCE_TESTS_DIR)" && \
yes | yo moda --skip-install && \
npm cache clean && \
npm install && \
bower install && \
gulp injectAll && \
yes | yo moda:r hello-route && \
yes | yo moda:d hello-directive && \
yes | yo moda:s hello-service && \
gulp testSingle && \
gulp build