1 | SRC = $(shell find lib -type f -name "*.js")
|
2 | TESTS = test/*
|
3 | REPORTER = spec
|
4 | TIMEOUT = 5000
|
5 |
|
6 | test:
|
7 | @./node_modules/.bin/mocha \
|
8 | --reporter $(REPORTER) --timeout $(TIMEOUT) $(TESTS)
|
9 |
|
10 | test-cov: lib-cov
|
11 | @JSCOV=1 $(MAKE) test REPORTER=html-cov > coverage.html && open coverage.html
|
12 |
|
13 | lib-cov:
|
14 | @rm -rf ./$@
|
15 | @jscoverage lib $@
|
16 |
|
17 | clean:
|
18 | rm -rf lib-cov
|
19 | rm -f coverage.html
|
20 |
|
21 | .PHONY: test test-cov
|