forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 905 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
TESTS=tests/*.js
MONGO_CONNECTION?=mongodb://localhost/test_db
CUSTOMCONNSTR_mongo_settings_collection?=test_settings
CUSTOMCONNSTR_mongo_collection?=test_sgvs
BLANKET=--require blanket
all: test
travis-cov:
NODE_ENV=test node_modules/.bin/mocha ${BLANKET} -R 'travis-cov' ${TESTS}
coveralls:
NODE_ENV=test \
./node_modules/.bin/mocha ${BLANKET} -R mocha-lcov-reporter \
${TESTS} | ./coverall.sh
coverhtml:
./node_modules/.bin/mocha ${BLANKET} -R html-cov ${TESTS} > tests/coverage.html
test:
MONGO_CONNECTION=${MONGO_CONNECTION} \
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} \
CUSTOMCONNSTR_mongo_settings_collection=${CUSTOMCONNSTR_mongo_settings_collection} \
mocha --verbose -vvv -R tap ${TESTS}
precover:
./node_modules/.bin/mocha ${BLANKET} ${SHOULD} -R html-cov ${TESTS} | w3m -T text/html
travis: test travis-cov coveralls coverhtml
.PHONY: test