Closed ghost closed 1 year ago
Thanks! I added a tip in the readme
A bit of bikeshedding, but you could shorten to (clojure.test/run-tests)
β without args it already defaults to running on current namespace, without any extra need for re-patterns.
@einars great point! Thanks!
I also noticed that the command clojure_sublimed_eval_code
always displays a β
in the status bar if the evaluation succeeds β which includes of course even the case when one or more tests failed or errors were thrown.
So Iβm currently rocking this:
{"keys": ["ctrl+t"],
"command": "clojure_sublimed_eval_code",
"args": {"code": "(let [{:keys [fail error] :as res} (clojure.test/run-tests)] (str (when (or (pos? fail) (pos? error)) \"π¨π¨π¨π¨π¨π¨π¨π¨ \") res))"}}
which might seem excessive but personally, I really needed the excessiveness so that the π¨ would very obviously βovershadowβ the β and get my attention.
I found that the prior example led to a very noisy test report in my terminal, which made it a chore to scroll to the output of the specific test ns I was working on. I suspect this might be a better default for folks like me who may not be experts in the machinery of
clojure.test
and the various ways to run the tests, etc.