chai/Makefile

49 lines
909 B
Makefile
Raw Normal View History

2011-12-07 06:10:15 +00:00
2011-12-15 10:28:16 +00:00
TESTS = test/*.js
REPORTER = dot
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
@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
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