This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-25
Channels
- # ai (8)
- # announcements (18)
- # architecture (6)
- # babashka (28)
- # bangalore-clj (1)
- # beginners (14)
- # calva (2)
- # cider (10)
- # clj-kondo (64)
- # clojure (87)
- # clojure-conj (3)
- # clojure-europe (28)
- # clojure-nl (2)
- # clojure-norway (11)
- # clojure-spec (24)
- # clojure-sweden (3)
- # clojurescript (4)
- # clr (8)
- # cursive (21)
- # data-science (5)
- # datomic (2)
- # defnpodcast (2)
- # figwheel-main (6)
- # graalvm (2)
- # hyperfiddle (15)
- # juxt (3)
- # lsp (5)
- # off-topic (32)
- # polylith (1)
- # practicalli (1)
- # rdf (7)
- # shadow-cljs (39)
- # sql (8)
- # xtdb (8)
I’m investigating how test results are printed in different environments and noticed that Calva outputs them differently than the default nrepl or CLI. We also have our own test message printing overrides which work in repl but don’t in Calva:
(.. ^clojure.lang.MultiFn clojure.test/report
(addMethod :fail report-fail)
(addMethod :error report-error))
Here is a test case:
(deftest is=-test
(is (= {:a "a" :b "b" :c "c"}
{:d "d" :b "b" :c "c"})))
Output in Calva:
; FAIL in calva-test/is=-test (calva_test.clj:350):
; expected:
{:a "a", :b "b", :c "c"}
; actual:
{:d "d", :b "b", :c "c"}
Output in nrepl without overrides:
FAIL in (is=-test) (calva_test.clj:350)
expected: (= {:a "a", :b "b", :c "c"} {:d "d", :b "b", :c "c"})
actual: (not (= {:a "a", :b "b", :c "c"} {:d "d", :b "b", :c "c"}))
How can I disable calva custom test output (basically to see the same output as in the last snippet, and possibly make our overrides shown in the first snippet work with calva)?