You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
993 B

7 years ago
  1. ALL_TESTS = $(shell find test/ -name '*.test.js')
  2. ALL_INTEGRATION = $(shell find test/ -name '*.integration.js')
  3. run-tests:
  4. @./node_modules/.bin/mocha \
  5. -t 5000 \
  6. -s 2400 \
  7. $(TESTFLAGS) \
  8. $(TESTS)
  9. run-integrationtests:
  10. @./node_modules/.bin/mocha \
  11. -t 5000 \
  12. -s 6000 \
  13. $(TESTFLAGS) \
  14. $(TESTS)
  15. run-coverage:
  16. @./node_modules/.bin/istanbul cover --report html \
  17. ./node_modules/.bin/_mocha -- \
  18. -t 5000 \
  19. -s 6000 \
  20. $(TESTFLAGS) \
  21. $(TESTS)
  22. test:
  23. @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
  24. integrationtest:
  25. @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_INTEGRATION)" run-integrationtests
  26. coverage:
  27. @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_TESTS)" run-coverage
  28. benchmark:
  29. @node bench/sender.benchmark.js
  30. @node bench/parser.benchmark.js
  31. autobahn:
  32. @NODE_PATH=lib node test/autobahn.js
  33. autobahn-server:
  34. @NODE_PATH=lib node test/autobahn-server.js
  35. .PHONY: test coverage