2014-05-16 16:23:00 +00:00
|
|
|
SRC = lib/*.js
|
|
|
|
|
|
|
|
include node_modules/make-lint/index.mk
|
|
|
|
|
2015-02-04 00:27:45 +00:00
|
|
|
BIN = iojs
|
|
|
|
|
|
|
|
ifeq ($(findstring io.js, $(shell which node)),)
|
|
|
|
BIN = node
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (node, $(BIN))
|
|
|
|
FLAGS = --harmony-generators
|
|
|
|
endif
|
|
|
|
|
2014-07-05 16:49:11 +00:00
|
|
|
TESTS = test/application \
|
|
|
|
test/context/* \
|
|
|
|
test/request/* \
|
2014-12-18 02:06:45 +00:00
|
|
|
test/response/* \
|
|
|
|
test/experimental/index.js
|
2014-07-05 16:49:11 +00:00
|
|
|
|
2013-08-17 07:15:57 +00:00
|
|
|
test:
|
2015-02-04 00:27:45 +00:00
|
|
|
@NODE_ENV=test $(BIN) $(FLAGS) \
|
|
|
|
./node_modules/.bin/_mocha \
|
2013-08-17 07:15:57 +00:00
|
|
|
--require should \
|
2014-07-05 16:49:11 +00:00
|
|
|
$(TESTS) \
|
|
|
|
--bail
|
|
|
|
|
|
|
|
test-cov:
|
2015-02-04 00:27:45 +00:00
|
|
|
@NODE_ENV=test $(BIN) $(FLAGS) \
|
|
|
|
./node_modules/.bin/istanbul cover \
|
2014-07-05 16:49:11 +00:00
|
|
|
./node_modules/.bin/_mocha \
|
|
|
|
-- -u exports \
|
|
|
|
--require should \
|
|
|
|
$(TESTS) \
|
|
|
|
--bail
|
|
|
|
|
|
|
|
test-travis:
|
2015-02-04 00:27:45 +00:00
|
|
|
@NODE_ENV=test $(BIN) $(FLAGS) \
|
|
|
|
./node_modules/.bin/istanbul cover \
|
2014-07-05 16:49:11 +00:00
|
|
|
./node_modules/.bin/_mocha \
|
|
|
|
--report lcovonly \
|
|
|
|
-- -u exports \
|
|
|
|
--require should \
|
|
|
|
$(TESTS) \
|
2013-08-17 07:15:57 +00:00
|
|
|
--bail
|
|
|
|
|
|
|
|
bench:
|
|
|
|
@$(MAKE) -C benchmarks
|
|
|
|
|
|
|
|
.PHONY: test bench
|