Hi. I am using the boot
with the test
task from adzerk.boot-test
. It prints Testing my.namespace.here
for every namespace I have in my project. Even if that namespace does not contain any tests. This is no fun, since one has to scroll up every thime a test fails. How to disable this output?
@witek That output comes from clojure.test
itself.
You may want to tell boot-test
to only load a subset of your namespaces. For example, if all your tests are in something.test.whatever
namespaces, you could provide -I test
to I-nclude only namespaces with test in their name.
@witek you could also try redefining clojure.test/report
method by adding this file into your test folder:
; Prettify test reports
(ns unit.reporter
(:require
[clojure.test :refer [report with-test-out]]))
; Change the report multimethod to ignore namespaces that don't contain any tests.
; taken from: <http://blog.jayfields.com/2010/08/clojuretest-introduction.html>
(defmethod report :begin-test-ns [m]
(with-test-out
(when (some #(:test (meta %)) (vals (ns-interns (:ns m))))
(println "\n-------====== Testing" (ns-name (:ns m)) "======-------"))))