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.

Makefile 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. NODETESTS ?= test/*.js test/node/*.js
  2. BROWSERTESTS ?= test/*.js test/client/*.js
  3. REPORTER = spec
  4. test:
  5. @if [ "x$(BROWSER)" = "x" ]; then make test-node; else make test-browser; fi
  6. test-node:
  7. @NODE_ENV=test ./node_modules/.bin/mocha \
  8. --require should \
  9. --trace-warnings \
  10. --throw-deprecation \
  11. --reporter $(REPORTER) \
  12. --timeout 5000 \
  13. $(NODETESTS)
  14. test-node-http2:
  15. @NODE_ENV=test HTTP2_TEST=1 node ./node_modules/.bin/mocha \
  16. --require should \
  17. --trace-warnings \
  18. --throw-deprecation \
  19. --reporter $(REPORTER) \
  20. --timeout 5000 \
  21. $(NODETESTS)
  22. test-cov: lib-cov
  23. SUPERAGENT_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
  24. test-browser:
  25. SAUCE_APPIUM_VERSION=1.7 ./node_modules/.bin/zuul -- $(BROWSERTESTS)
  26. test-browser-local:
  27. ./node_modules/.bin/zuul --no-coverage --local 4000 -- $(BROWSERTESTS)
  28. lib-cov:
  29. jscoverage lib lib-cov
  30. test-server:
  31. @node test/server
  32. docs: index.html test-docs docs/index.md
  33. index.html: docs/index.md docs/head.html docs/tail.html
  34. marked < $< \
  35. | cat docs/head.html - docs/tail.html \
  36. > $@
  37. docclean:
  38. rm -f index.html docs/test.html
  39. test-docs: docs/head.html docs/tail.html
  40. make test REPORTER=doc \
  41. | cat docs/head.html - docs/tail.html \
  42. > docs/test.html
  43. clean:
  44. rm -fr components
  45. .PHONY: test-cov test docs test-docs clean test-browser-local