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
|
TESTS = test/node/*.js
REPORTER = dot
all: superagent.js
test:
@NODE_ENV=test NODE_TLS_REJECT_UNAUTHORIZED=0 ./node_modules/.bin/mocha \
--require should \
--reporter $(REPORTER) \
--timeout 5000 \
--growl \
$(TESTS)
test-cov: lib-cov
SUPERAGENT_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
lib-cov:
jscoverage lib lib-cov
superagent.js: components
@component build \
--standalone superagent \
--out . --name superagent
components:
component install
test-server:
@node test/server
docs: test-docs
test-docs:
make test REPORTER=doc \
| cat docs/head.html - docs/tail.html \
> docs/test.html
clean:
rm -fr superagent.js components
.PHONY: test-cov test docs test-docs clean
|