Welcome! Please see the About page for a little more info on how this works.

+1 vote
in test.check by

I've been a fan of test.check since the beginning. However, I've never found a convenient way to capture the output when using defspec. When used with clojure.test, one gets output that looks like:

Testing tst.tupelo.y64 {:result true, :num-tests 999, :seed 1722976402694, :time-elapsed-ms 53, :test-var "dospec-line-53"} {:result true, :num-tests 999, :seed 1722976402747, :time-elapsed-ms 36, :test-var "dospec-line-44"}

somewhat polluting the unit test output. How can one capture and/or suppress this output?

1 Answer

+1 vote
by

OK, I found the answer. Just add the following to the top of each unit test file:

(alter-var-root (var tst/*report-completion*) (constantly false))

...