forked from Slotos/passport-reddit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (39 loc) · 1.38 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
# ==============================================================================
# Node Tests
# ==============================================================================
REPORTER = spec
test:
@NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/mocha \
--reporter $(REPORTER)
test-debug:
@NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/mocha debug \
--reporter $(REPORTER)
integration:
@NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/mocha test/integration \
--reporter $(REPORTER)
# Include both regular and integration tests into watch test
test-w:
@NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/mocha test test/integration \
--reporter min \
--grown \
--watch
coverage:
@NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/mocha \
--require blanket \
--reporter html-cov > ./test/coverage.html
# I need both tests and coverage report here
coveralls:
$(MAKE) test
$(MAKE) integration
@NODE_ENV=test NODE_PATH=lib PASSPORT_REDDIT_COVERAGE=1 ./node_modules/.bin/mocha \
--require blanket \
--reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
# ==============================================================================
# Static Analysis
# ==============================================================================
JSHINT = jshint
SOURCES = lib/passport-reddit
hint: lint
lint:
$(JSHINT) $(SOURCES)
.PHONY: test hint lint test-w nyan coverage