Does the leiningen test runner exist as a separate library anywhere? I'd like to use it in a Clojure CLI project 🙊
clj -Sdeps '{:deps{leiningen/leiningen {:mvn/version "2.9.10"}}}' -M -m leiningen.core.main test
The actual way: add leiningen/leiningen {:mvn/version "2.9.10"} to your :test profile, and call clj -A:test -M -m leiningen.core.main test ...
I'd be surprised if that worked - doesn't Lein parse projects and apply project-evaluation / profile merging rules?
IDK how it will handle the classpath (actually IDK how lein handle the classpath).
I think that for bigger projects, it will require a project.clj
Yeah, I mean, having a project.clj that duplicates deps.edn content is probably besides the point of OP. Anyway, there's a recipe for that... use Lein's dynamism to slurp deps.edn. This is my generic project.clj that I tend to add to deps.edn -based projects: https://gist.github.com/vemv/b33256a889dcfd95e8ded64c52dd907e (it has worked for me over the last couple years. No guarantee though. There's also a plugin)
I’ve always treated https://github.com/circleci/circleci.test as Leiningen’s test runner’s spiritual successor, so maybe that could work?
I'll try that out too, thanks. I suspect I'll just have to bite the bullet and force us to switch to something else (cognitect or kaocha or circleci), lol, just gonna make some people complain
I'd love the opposite (use cognitect test runner from Lein) but they won't cut a mvn release 🥲
I'd say that Lein's test.clj it's very far from extractable without some substantial refactoring first.
So you'd be better off with cognitect or kaocha.
In the end, as you may know well clojure.test nowadays is sort of an interoperable standard, so the runner doesn't matter as much!
that's all true but the :only and test selector command line interface is just what i'm used to and what my team is used to, so as i try to transition us from lein to clojure cli, i'm trying to smooth over some of these edges
:includes - coll of test metadata keywords to include
this opt sounds easy enough to adopt?