weavejester / eftest

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

running meta test using eftest programmatically #19

Closed ghost closed 7 years ago

ghost commented 7 years ago

Is there any easy way to run eftest programmatically? Just like lein eftest :integration but in code instead. Thanks

weavejester commented 7 years ago

Is there any easy way to run eftest programmatically?

Yes, it's documented in the README, and is what Eftest was designed to do. To run all tests in the "test" directory:

(run-tests (find-tests "test"))

To run tests that have certain metadata:

(run-tests (filter (comp :integration meta) (find-tests "test")))

The find-tests function returns a collection of vars, so you can filter them based on whatever criteria you desire.

ghost commented 7 years ago

how come I didn't find this in the first place. Thanks!