(run-tests) (run-tests & namespaces)
Runs all tests in the given namespaces; prints results. Defaults to current namespace if none given. Returns a map summarizing test results.
;; assuming current namespace is user
(use 'clojure.test)
(deftest eg-tests (is (= 1 1)))
(run-tests)
;;=> Testing user
;;=> Ran 1 tests containing 1 assertions.
;;=> 0 failures, 0 errors.
;;=> {:type :summary, :fail 0, :error 0, :pass 1, :test 1}
(run-tests 'user) ; if supplying a namespace to test, must quote
;;=> Testing user
;;=> Ran 1 tests containing 1 assertions.
;;=> 0 failures, 0 errors.
;;=> {:type :summary, :fail 0, :error 0, :pass 1, :test 1}