Search code examples
testingclojurefunctional-programmingleiningenspeclj

Is there a single command to run tests from both clojure.test and Speclj?


I have an already working application that has some tests written with clojure.test

I want to create some new tests to raise code coverage, but this time using Speclj since tests look nicer.

However, now in order to make sure all tests are passing, I need to run lein test to run tests from clojure.test and lein spec to run tests from speclj.

Is there a single command to run all the tests no matter the library I chose?


Solution

  • You could specify an alias in leiningen, add the following line to project.clj:

    :aliases {"test-all" ["do" ["test"] ["spec"]]}
    

    and run it with lein test-all