Fork me on GitHub
#cider
<
2021-03-24
>
vemv17:03:35

anyone around here actively uses the nubank/matcher-combinators lib? I'd like to know if it breaks your cider's clojure.test integration (of if it's only for me - I use an odd/old cider)

enn17:03:16

Yes, I do, and the ANSI color codes don’t render correctly. A coworker has a bit of elisp to fix it, let me find it.

vemv17:03:03

for me the biggest issue is false negatives: tests based on match? report success even if not passing

enn17:03:26

hmm, I haven’t seen that.

enn17:03:55

it might be an old cider issue, I’m on recent versions of cider and nrepl

👍 3
vemv17:03:46

the weird thing is that ultimately matcher-combinators uses clojure.test, so when properly using clojure.test, things should just work :) i.e. CIDER (old and new) is smart enough to integrate with arbitrary frameworks as long as they use clojure.test properly

vemv17:03:57

appreciate much the confirmation anyway!

hcarvalhoaves21:03:37

Hi @U45T93RA6, for the false positives, you can check if the code isn't forgetting to assert the match (is (match? ...)) instead of just (match? ...) , I've been bitten by this in the past

vemv21:03:58

hi, thanks for the response! I tried again just now, no luck sadly

vemv22:03:56

turns out: * cider has its own report multimethod * cider manually defines a custom defmethod for matcher-combinators: https://github.com/clojure-emacs/cider-nrepl/blob/cd29bd761e58707d438b3373d7512c9e33ded865/src/cider/nrepl/middleware/test.clj#L177-L181 as mentioned in my OP, my cider is older than current. Anyway honestly a few things seem off to me (why use a custom :matcher-combinators/mismatch dispatch value? why cider has to create its own API that doesn't leverage 3rd party clojure.test integrations automatically?)