Fork me on GitHub
#cursive
<
2022-09-24
>
Jeff Evans16:09:33

Is anyone having issues getting the assertion failure diff to render properly in the IDE? I double checked that I am current on license/IDE/plugin version, and still, hovering over the squiggly lines doesn’t show the actual diff between expected and actual. It only shows “Assertion failed. <test context name”. Also, clicking on the warning icon in the left line number bar tries to set a breakpoint, instead of popping up the diff view. Both of these behaviors used to work fine, so I’m wondering what changed? Maybe something I need to update on my end? Edit: figured out what was going on. The actual value was (quite unexpectedly) nil instead of some map. In this case, the little “Show difference” option is not even available on hover over. Might be a nice enhancement for it to still allow the “Show difference” option, and show the full expected map on the left, with simply nil on the right?

👍 1
Ivar Refsdal17:09:24

I've seen more people been confused by this as well..

cfleming04:09:09

Could you file an issue for that so it doesn’t get lost? That definitely sounds like something that needs fixing.

Jeff Evans20:09:45

Well, truth be told, I’m unable to repro the problem in a standalone, dead simple test case I tried, so I’m wondering what might be causing it for my complicated project :thinking_face: Cursive is doing the right thing for both of these:

(deftest sample-test
  (is (= nil {:a 1})))
(deftest sample-test
  (is (= {:b 1} {:a 1})))