-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (46 loc) · 1.57 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
66
67
SOURCES = *.js lib/*.js
TESTS = test/*.test.js
# ==============================================================================
# Browser Tests
# ==============================================================================
CHROME = open -a "Google Chrome"
FIREFOX = open -a "Firefox"
SAFARI = open -a "Safari"
PHANTOMJS = phantomjs
MOCHA_PHANTOMJS = ./node_modules/.bin/mocha-phantomjs
WWW_TESTS = test/www/index.html
test: test-phantomjs
test-chrome:
$(CHROME) $(WWW_TESTS)
test-firefox:
$(FIREFOX) $(WWW_TESTS)
test-safari:
$(SAFARI) $(WWW_TESTS)
test-phantomjs:
$(MOCHA_PHANTOMJS) $(WWW_TESTS)
# Prior to running tests on Sauce Labs, ensure that a local server is listening
# and Sauce Connect is tunneling requests to it.
#
# $ java -jar Sauce-Connect.jar $SAUCE_LABS_USERNAME $SAUCE_LABS_ACCESS_KEY
# $ node test/cloud/server.js
#
test-cloud: test-saucelabs
test-saucelabs:
clear && node test/cloud/terminal.js
# ==============================================================================
# Node Tests
# ==============================================================================
MOCHA = ./node_modules/.bin/mocha
test-node:
@NODE_PATH=.. \
$(MOCHA) \
--require test/node/bootstrap \
--reporter spec $(TESTS)
# ==============================================================================
# Static Analysis
# ==============================================================================
JSHINT = jshint
hint: lint
lint:
$(JSHINT) $(SOURCES)
.PHONY: test test-chrome test-firefox test-safari test-phantomjs test-cloud test-saucelabs test-node hint lint