cursive

hlship 2025-03-21T18:58:02.199769Z

One thing I find myself doing is using the console to lein test or clj -X:test when I want to run all my tests, across all namespaces. I've noticed that I can created a clojure.test run mode, but that also starts a new process to run the tests. What I would like would be a way to run all tests across all namespaces (in the current module) in the running REPL. I'm sure this must have come up at some point, is there a discussion on such a feature?

cfleming 2025-03-23T08:17:04.152709Z

There isn't a way to do this in the IDE, but having the test run configs use the open REPL is something I've thought about. I'll look into it. In the meantime something like eftest or kaocha are probably the best bet.

imre 2025-03-21T19:46:27.650869Z

I use kaocha.repl/run... for this but it's easy for me as we use kaocha for cli/ci runs so it's included

onetom 2025-03-24T10:47:11.090999Z

there is also the light-weight https://github.com/cognitect-labs/test-runner u can just run tests with ((requiring-resolve 'cognitect.test-runner.api/test) {}) from your repl, which can be made more comfortable by defining a Cursive REPL Command for it and bind that some some key combo.

onetom 2025-03-25T05:57:51.331239Z

btw, the official Clojure https://clojure.org/guides/deps_and_cli#test_runner also has a few words on this tool