Hi y'all! I'm on the tail of a weird interaction between the matcher-combinators library and cider's test runner. When I run a test that uses matcher-combinators using an external test runner, I get an output that looks like this:
FAIL in (string-with-quotes-test) (test_test.clj:120)
expected: (match? "foo bar" [])
actual: (mismatch (expected "foo bar") (actual []))
But when I run it in Calva's test runner with the REPL window output destination, I get this:
; FAIL in (string-with-quotes-test) (test_test.clj:120)
; expected:
(match? "foo bar" [])
; actual:
(mismatch (expected foo bar) (actual []))
Notice that the quotes around "foo bar" are gone. This isn't great b/c it makes it hard to tell what's actually in the failing data. For example:
(is (match? "foo bar"
["foo" "bar"]))
;=>
(mismatch (expected foo bar) (actual [foo bar]))
(is (match? "foo bar"
["foo bar"])
;=>
(mismatch (expected foo bar) (actual [foo bar]))
Both of these examples result in the same output, despite them having different inputs.
I've confirmed that the quotes are missing in the test result data that Calva gets back from the repl server, which points to the issue being in cider's test runner somewhere. Any idea why it would be removing the quotes?Hello! You are right, I had noticed that as well. cider-nrepl has some special handling for matcher-combinators, and I guess that's where it messes it up. I'll take a look
Wow that was fast!