2011-12-07 06:10:15 +00:00
|
|
|
|
2011-12-15 10:28:16 +00:00
|
|
|
TESTS = test/*.js
|
2012-05-04 18:17:08 +00:00
|
|
|
REPORTER = dot
|
2012-04-10 20:40:19 +00:00
|
|
|
SRC = $(shell find lib -name "*.js" -type f | sort)
|
2011-12-07 06:10:15 +00:00
|
|
|
|
|
|
|
all: chai.js
|
|
|
|
|
|
|
|
chai.js: $(SRC)
|
|
|
|
@node support/compile $^
|
|
|
|
|
|
|
|
clean:
|
2012-02-24 07:59:52 +00:00
|
|
|
@rm -f chai.js
|
2011-12-15 10:28:16 +00:00
|
|
|
|
2011-12-15 22:49:13 +00:00
|
|
|
docs: clean-docs
|
2012-02-10 16:32:44 +00:00
|
|
|
@./node_modules/.bin/codex build \
|
|
|
|
-i docs
|
|
|
|
@cp chai.js docs/out/chai.js
|
2012-05-09 22:42:55 +00:00
|
|
|
@mkdir -p docs/out/public/js/tests
|
|
|
|
@cp node_modules/mocha/mocha.js docs/out/public/js/tests
|
|
|
|
@cp -R test/*.js docs/out/public/js/tests
|
2012-05-08 02:11:44 +00:00
|
|
|
@node docs/app/app.js
|
2011-12-15 22:49:13 +00:00
|
|
|
|
2012-05-09 16:23:04 +00:00
|
|
|
make doc-server:
|
|
|
|
@node docs/app/app.js
|
|
|
|
|
2011-12-15 22:49:13 +00:00
|
|
|
clean-docs:
|
|
|
|
@rm -rf docs/out
|
|
|
|
|
2011-12-15 10:28:16 +00:00
|
|
|
test:
|
|
|
|
@NODE_ENV=test ./node_modules/.bin/mocha \
|
|
|
|
--reporter $(REPORTER) \
|
2011-12-26 18:19:22 +00:00
|
|
|
--ui tdd \
|
2011-12-15 10:28:16 +00:00
|
|
|
$(TESTS)
|
|
|
|
|
2012-02-24 07:59:52 +00:00
|
|
|
test-cov: lib-cov
|
|
|
|
@CHAI_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
|
|
|
|
|
|
|
|
lib-cov:
|
|
|
|
@rm -rf lib-cov
|
|
|
|
@jscoverage lib lib-cov
|
|
|
|
|
2012-04-07 01:15:54 +00:00
|
|
|
test-display:
|
|
|
|
@NODE_ENV=test ./node_modules/.bin/mocha \
|
|
|
|
--reporter $(REPORTER) \
|
|
|
|
--ui tdd \
|
|
|
|
test/display/*.js
|
|
|
|
|
2012-05-09 16:23:04 +00:00
|
|
|
.PHONY: clean test docs clean-docs doc-server test-cov lib-cov
|