Commit a6fad102 authored by Hannah Stepanek's avatar Hannah Stepanek

Add debug to makefile for interactive test debug

parent f0f64465
...@@ -8,7 +8,8 @@ help: ...@@ -8,7 +8,8 @@ help:
@echo "make lint Run the code linter(s) and print any warnings" @echo "make lint Run the code linter(s) and print any warnings"
@echo "make checkformatting Check code formatting" @echo "make checkformatting Check code formatting"
@echo "make format Automatically format code" @echo "make format Automatically format code"
@echo "make test Run the unit tests" @echo "make test Run the unit tests once"
@echo "make servetests Start the unit test server on localhost"
@echo "make docs Build docs website and serve it locally" @echo "make docs Build docs website and serve it locally"
@echo "make checkdocs Crash if building the docs website fails" @echo "make checkdocs Crash if building the docs website fails"
@echo "make clean Delete development artefacts (cached files, " @echo "make clean Delete development artefacts (cached files, "
...@@ -26,6 +27,10 @@ else ...@@ -26,6 +27,10 @@ else
yarn test yarn test
endif endif
.PHONY: servetests
servetests: node_modules/.uptodate
gulp test-watch
.PHONY: lint .PHONY: lint
lint: node_modules/.uptodate lint: node_modules/.uptodate
yarn run lint yarn run lint
......
...@@ -128,15 +128,20 @@ Hypothesis uses Karma and mocha for testing. To run all the tests once, run: ...@@ -128,15 +128,20 @@ Hypothesis uses Karma and mocha for testing. To run all the tests once, run:
make test make test
You can filter the tests which are run by running ``make test FILTER=<pattern>``.
See the documentation for Mocha's
`grep <https://mochajs.org/#g---grep-pattern>`_ option.
To run tests and automatically re-run them whenever any source files change, run: To run tests and automatically re-run them whenever any source files change, run:
.. code-block:: sh .. code-block:: sh
gulp test-watch make servetests
This command will also serve the tests on localhost (typically `http://localhost:9876`)
so that break points can be set and the browser's console can be used for interactive
debugging.
You can filter the tests which are run by running ``make test FILTER=<pattern>``.
See the documentation for Mocha's
`grep <https://mochajs.org/#g---grep-pattern>`_ option.
Code Style Code Style
---------- ----------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment