Dominykas Mostauskis
Dominykas Mostauskis

Reputation: 8125

How to run all project's tests from REPL?

How to run all leiningen project's tests from REPL? Leiningen's lein test does this. How to do it from the REPL?

Upvotes: 4

Views: 1249

Answers (1)

Joost Diepenmaat
Joost Diepenmaat

Reputation: 17773

You can run all currently loaded tests by calling (clojure.test/run-all-tests).

Note that that does not automatically load the tests you want to run. If your tests can be run via "lein test" you should be able to require the test namespaces like any other namespace.

If you're using emacs with CIDER, you should also be able to do C-c , in a namespace to run its tests (this will load that test if it wasn't loaded before).

Upvotes: 7

Related Questions