Last active
October 14, 2020 20:58
-
-
Save nbardiuk/cdc78162b0de0d684ed0f3272a152b36 to your computer and use it in GitHub Desktop.
Clojure tdd (test watch) using headless lein and rep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: tdd | |
tdd: .nrepl-port | |
watchexec --clear --no-shell rep '(repl/refresh)(doto "$(only)" (run-tests))' | |
.PHONY: kill-repl | |
kill-repl: | |
@if [ -f .nrepl-port ];\ | |
then\ | |
kill $$(lsof -ti ":$$(cat .nrepl-port)" -sTCP:LISTEN) ;\ | |
fi | |
.nrepl-port: | |
lein repl :headless & | |
@until [ -f .nrepl-port ] ; do sleep 1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
make tdd only='test-selector'
https://github.com/eraserhd/rep/
https://github.com/watchexec/watchexec