Skip to content

Instantly share code, notes, and snippets.

@nbardiuk
Last active October 14, 2020 20:58
Show Gist options
  • Save nbardiuk/cdc78162b0de0d684ed0f3272a152b36 to your computer and use it in GitHub Desktop.
Save nbardiuk/cdc78162b0de0d684ed0f3272a152b36 to your computer and use it in GitHub Desktop.
Clojure tdd (test watch) using headless lein and rep
.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
@nbardiuk
Copy link
Author

nbardiuk commented Oct 14, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment