DEV Community

Clarice Bouwer
Clarice Bouwer

Posted on

2 1

How to run a single Clojure test from the terminal using Leiningen

Use case

You may want to target and run a specific test or set of tests when testing your code so that you don't keep executing the entire suite each time you make changes to specific tests. This creates a faster feedback loop for you to build and fix code. Usually tests are executed with Leiningen using lein test. You can extend this command to meet the necessary objectives.

How

lein test :only my.namespace/my-test
Enter fullscreen mode Exit fullscreen mode

Thanks

Thanks to this question and answer on Stack Overflow. <3

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay