forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (101 loc) · 2.47 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
REPORTER ?= dot
TM_DEST = ~/Library/Application\ Support/TextMate/Bundles
TM_BUNDLE = JavaScript\ mocha.tmbundle
SRC = $(shell find lib -name "*.js" -type f | sort)
SUPPORT = $(wildcard support/*.js)
all: mocha.js
lib/browser/diff.js: node_modules/diff/diff.js
cp node_modules/diff/diff.js lib/browser/diff.js
mocha.js: $(SRC) $(SUPPORT) lib/browser/diff.js
@node support/compile $(SRC)
@cat \
support/head.js \
_mocha.js \
support/tail.js \
support/foot.js \
> mocha.js
clean:
rm -f mocha.js
rm -fr lib-cov
rm -f coverage.html
test-cov: lib-cov
@COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
lib-cov:
@rm -fr ./$@
@jscoverage lib $@
test: test-unit
test-all: test-bdd test-tdd test-qunit test-exports test-unit test-grep test-jsapi test-compilers
test-jsapi:
@node test/jsapi
test-unit:
@./bin/mocha \
--reporter $(REPORTER) \
test/acceptance/*.js \
test/*.js
test-compilers:
@./bin/mocha \
--reporter $(REPORTER) \
--compilers coffee:coffee-script,foo:./test/compiler/foo \
test/acceptance/test.coffee \
test/acceptance/test.foo
test-bdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui bdd \
test/acceptance/interfaces/bdd
test-tdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui tdd \
test/acceptance/interfaces/tdd
test-qunit:
@./bin/mocha \
--reporter $(REPORTER) \
--ui qunit \
test/acceptance/interfaces/qunit
test-exports:
@./bin/mocha \
--reporter $(REPORTER) \
--ui exports \
test/acceptance/interfaces/exports
test-grep:
@./bin/mocha \
--reporter $(REPORTER) \
--grep fast \
test/acceptance/misc/grep
test-invert:
@./bin/mocha \
--reporter $(REPORTER) \
--grep slow \
--invert \
test/acceptance/misc/grep
test-bail:
@./bin/mocha \
--reporter $(REPORTER) \
--bail \
test/acceptance/misc/bail
test-async-only:
@./bin/mocha \
--reporter $(REPORTER) \
--async-only \
test/acceptance/misc/asyncOnly
non-tty:
@./bin/mocha \
--reporter dot \
test/acceptance/interfaces/bdd 2>&1 > /tmp/dot.out
@echo dot:
@cat /tmp/dot.out
@./bin/mocha \
--reporter list \
test/acceptance/interfaces/bdd 2>&1 > /tmp/list.out
@echo list:
@cat /tmp/list.out
@./bin/mocha \
--reporter spec \
test/acceptance/interfaces/bdd 2>&1 > /tmp/spec.out
@echo spec:
@cat /tmp/spec.out
tm:
mkdir -p $(TM_DEST)
cp -fr editors/$(TM_BUNDLE) $(TM_DEST)
.PHONY: test-cov test-jsapi test-compilers watch test test-all test-bdd test-tdd test-qunit test-exports test-unit non-tty test-grep tm clean