This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-19
Channels
- # announcements (4)
- # aws (9)
- # babashka (1)
- # beginners (41)
- # cider (13)
- # clojure (45)
- # clojure-europe (16)
- # clojure-hungary (3)
- # clojure-norway (6)
- # clojure-uk (6)
- # clojurescript (14)
- # clr (3)
- # css (1)
- # datalevin (2)
- # datomic (2)
- # fulcro (8)
- # introduce-yourself (6)
- # jobs (3)
- # malli (2)
- # nbb (49)
- # off-topic (3)
- # reitit (23)
- # shadow-cljs (36)
- # tools-deps (2)
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
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)