-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (39 loc) · 1.35 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
SOURCES = *.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: test/www/js/lib
$(CHROME) $(WWW_TESTS)
test-firefox: test/www/js/lib
$(FIREFOX) $(WWW_TESTS)
test-safari: test/www/js/lib
$(SAFARI) $(WWW_TESTS)
test-phantomjs: test/www/js/lib
$(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
test/www/js/lib:
cd test/www && volo add
# ==============================================================================
# Static Analysis
# ==============================================================================
JSHINT = jshint
hint: lint
lint:
$(JSHINT) $(SOURCES)
.PHONY: test test-chrome test-firefox test-safari test-phantomjs test-cloud test-saucelabs hint lint