Skip to content

Commit 50c500d

Browse files
committed
Add compatibility with matcher-combinators
Currently when running a test through cider, any failures in a `(is (match? ,,,))` clause will be silently ignores. This detects mismatch messages and treats them as failure messages. Where there is a mismatch the user will see a {:expected x :actual y} in the test output.
1 parent 6b2cc29 commit 50c500d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cider/nrepl/middleware/test.clj

+6
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@
171171
[m]
172172
(report-shrinking m))
173173

174+
(defmethod report :matcher-combinators/mismatch
175+
[m]
176+
(report-final-status (assoc m
177+
:type :fail
178+
:actual (:markup m))))
179+
174180
(defn report-fixture-error
175181
"Delegate reporting for test fixture errors to the `report` function. This
176182
finds the erring test fixture in the stacktrace and binds it as the current

0 commit comments

Comments
 (0)