Fork me on GitHub
#malli
<
2022-07-19
>
AJ Jaro13:07:29

We recently updated a functions schema definition and it wasn’t written correctly, but not caught during the tests. Is there a way that Malli can be configured to validate arguments during Clojure tests? It was caught during “manual” testing but not during the automated tests

respatialized18:07:41

In your test namespace:

(require '[malli.instrument :as mi]
[clojure.test :as t])

(defn instrument-fixture [f]
(mi/collect!)
(mi/instrument!)
(f)
(mi/uninstrument!)
)

(t/use-fixtures :once instrument-fixture)