Skip to content

Commit

Permalink
Add compatibility with matcher-combinators
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
plexus authored and bbatsov committed Oct 2, 2018
1 parent 6b2cc29 commit b2c0b92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## master (unreleased)

### New features

* [#546](https://github.com/clojure-emacs/cider-nrepl/pull/546): Added support for matcher-combinators to the test middleware.

## 0.18.0 (2018-08-06)

### New features
Expand Down
6 changes: 6 additions & 0 deletions src/cider/nrepl/middleware/test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@
[m]
(report-shrinking m))

(defmethod report :matcher-combinators/mismatch
[m]
(report-final-status (assoc m
:type :fail
:actual (:markup m))))

(defn report-fixture-error
"Delegate reporting for test fixture errors to the `report` function. This
finds the erring test fixture in the stacktrace and binds it as the current
Expand Down

0 comments on commit b2c0b92

Please sign in to comment.