forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
85 lines (64 loc) · 1.49 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
REPORTER = dot
TM_DEST = ~/Library/Application\ Support/TextMate/Bundles
TM_BUNDLE = JavaScript\ mocha.tmbundle
SRC = $(shell find lib -name "*.js" -type f)
SUPPORT = $(wildcard support/*.js)
all: mocha.js mocha.css
mocha.css: test/browser/style.css
cp -f $< $@
mocha.js: $(SRC) $(SUPPORT)
@node support/compile $(SRC)
@cat \
support/head.js \
_mocha.js \
support/{tail,foot}.js \
> mocha.js
clean:
rm -f mocha.{js,css}
test: test-unit
test-all: test-bdd test-tdd test-exports test-unit test-grep
test-unit:
@./bin/mocha \
--reporter $(REPORTER)
test-bdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui bdd \
test/interfaces/bdd
test-tdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui tdd \
test/interfaces/tdd
test-exports:
@./bin/mocha \
--reporter $(REPORTER) \
--ui exports \
test/interfaces/exports
test-grep:
@./bin/mocha \
--reporter $(REPORTER) \
--grep fast \
test/misc/grep
non-tty:
@./bin/mocha \
--reporter dot \
test/interfaces/bdd 2>&1 > /tmp/dot.out
@echo dot:
@cat /tmp/dot.out
@./bin/mocha \
--reporter list \
test/interfaces/bdd 2>&1 > /tmp/list.out
@echo list:
@cat /tmp/list.out
@./bin/mocha \
--reporter spec \
test/interfaces/bdd 2>&1 > /tmp/spec.out
@echo spec:
@cat /tmp/spec.out
watch:
watch --interval=1 $(MAKE) mocha.{js,css}
tm:
mkdir -p $(TM_DEST)/$(TM_BUNDLE)
cp -fr editors/$(TM_BUNDLE) $(TM_DEST)/$(TM_BUNDLE)
.PHONY: watch test test-all test-bdd test-tdd test-exports test-unit non-tty test-grep tm clean