1 | TESTS = $(shell find test/ -name '*.test.js')
|
2 | REPORTER?=spec
|
3 | FLAGS=--reporter $(REPORTER)
|
4 |
|
5 | run-tests:
|
6 | @./node_modules/.bin/mocha --timeout 5000 $(TESTS) $(FLAGS)
|
7 |
|
8 | watch-tests:
|
9 | @./node_modules/.bin/mocha --timeout 5000 --watch $(TESTS) $(FLAGS)
|
10 |
|
11 | test:
|
12 | @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
|
13 |
|
14 | #This is used to validate the tests work on redis_mock
|
15 | check-tests:
|
16 | @$(MAKE) NODE_PATH=lib VALID_TESTS="TRUE" TESTS="$(ALL_TESTS)" run-tests
|
17 |
|
18 | .PHONY: test
|