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
|
Description: Generalise Makefile
Allow Makefile to use system-installed mocha
Author: Ximin Luo <infinity0@debian.org>
Forwarded: https://github.com/websockets/ws/pull/671
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,16 @@
ALL_TESTS = $(shell find test/ -name '*.test.js')
ALL_INTEGRATION = $(shell find test/ -name '*.integration.js')
+MOCHA = ./node_modules/.bin/mocha
run-tests:
- @./node_modules/.bin/mocha \
+ @$(MOCHA) \
-t 5000 \
-s 2400 \
$(TESTFLAGS) \
$(TESTS)
run-integrationtests:
- @./node_modules/.bin/mocha \
+ @$(MOCHA) \
-t 5000 \
-s 6000 \
$(TESTFLAGS) \
|