weavejester / eftest

Fast and pretty Clojure test runner
425 stars 40 forks source link

Support for running a single test from command line #37

Closed psyho closed 6 years ago

psyho commented 6 years ago

With lein test I can run a single test with a command like lein test :only foo.bar/baz. As far as I can tell, lein eftest only supports running tests for entire namespaces. Is there support for running a single test and if so, how can I do it?

PS. Thanks for this excellent library, I think this is the most complete clojure test runner that I encountered so far!

johanatan commented 6 years ago

:+1:

johanatan commented 6 years ago

I came here to open the same issue and found this existing one instead. :)

weavejester commented 6 years ago

Eftest copies a bunch of code from lein test, but this may be functionality that is not in the Eftest Leiningen plugin yet.

jayemar commented 5 months ago

For those coming here to find the syntax, if you want to run the tests for a single namespace you don't need the :only keyword, but you do if you want to run a single test from a single namespace:

# Run all tests in my-namespace
lein eftest my-project.my-namespace
lein eftest :only my-project.my-namespace

# Run a single test in my-namespace
lein eftest :only my-project.my-namespace/test-to-run