Skip to content

Commit f21849e

Browse files
[test] Don't turn records into maps when post-processing test results
1 parent 7f8ee3b commit f21849e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/cider/nrepl/middleware/test.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
(try
7979
(walk/postwalk
8080
(fn [x]
81-
(if (map? x)
81+
(if (and (map? x) (not (record? x))) ;; Prevent records turning into maps
8282
(with-meta (into (sorted-map) x) (meta x))
8383
x))
8484
m)

Diff for: test/clj/cider/nrepl/middleware/test_test.clj

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@
199199

200200
(deftest print-object-test
201201
(testing "uses println for matcher-combinators results, otherwise invokes pprint"
202-
(is (= "{no quotes}\n"
202+
(is (= "(mismatch (expected [33m1[0m) (actual [31m2[0m))\n"
203203
(#'test/print-object (matcher-combinators.clj-test/tagged-for-pretty-printing
204204
'(not (match? 1 2))
205-
{:matcher-combinators.result/value {"no" "quotes"}})))
205+
{:matcher-combinators.result/value (matcher-combinators.model/->Mismatch "1" "2")})))
206206
"println is chosen, as indicated by strings printed without quotes")
207207
(is (= "{:a\n (\"a-sufficiently-long-string\"\n \"a-sufficiently-long-string\"\n \"a-sufficiently-long-string\")}\n"
208208
(#'test/print-object {:a (repeat 3 "a-sufficiently-long-string")}))

0 commit comments

Comments
 (0)