hey all, I typically run my test suite via lein test and use a pretty vanilla clojure.test setup
is there a way to easily integrate expound?
(ns foo.core-test
(:require [clojure.spec.alpha :as spec]
[clojure.test :as test :refer :all]
[expound.alpha :as expound]
[orchestra.spec.test :as spectest]))
(spec/check-asserts true)
(spectest/instrument)
(set! spec/*explain-out* expound/printer)
(deftest foo-test
...)
I've attempted something like the above but I'm still seeing default spec error reportsYou need to register some specific report to handle errors of type :error. Here’s how clojure.test handles errors
https://github.com/clojure/clojure/blob/35bd89f05f8dc4aec47001ca10fe9163abc02ea6/src/clj/clojure/test.clj#L717-L720
e.g. you’d override this multi-method https://github.com/clojure/clojure/blob/35bd89f05f8dc4aec47001ca10fe9163abc02ea6/src/clj/clojure/test.clj#L717-L720
Here’s some code to get you started https://github.com/bhb/expound#manual-clojuretestreport-override