Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v0.1.2
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.625 kB
PWD = $(shell pwd)
TEST_REPORTER ?= dot
TEST_PORT ?= 8080
TEST_TIMEOUT ?= 4000
TEST_SLOW ?= 2000
NODE_MODULES = $(PWD)/node_modules
# XXX: below may be a bit too clever
PID_FILE := $(PWD)/$(shell echo ".test-server-pid.$$RANDOM")
test:
@cd tests/fixtures ; \
$(NODE_MODULES)/.bin/http-server -s -p $(TEST_PORT) & \
echo "$$!" > $(PID_FILE) ; \
cd $(PWD)
@$(NODE_MODULES)/.bin/mocha tests/test --recursive \
--globals define \
--timeout $(TEST_TIMEOUT) --slow $(TEST_SLOW) \
-R $(TEST_REPORTER) $(TEST_ARGS) ; \
STATUS=$$? ; \
kill -9 `cat $(PID_FILE)` ; rm $(PID_FILE) ; \
exit $$STATUS
.PHONY: test
Jump to Line
Something went wrong with that request. Please try again.