cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Show test markers top-level, not only at place where `is` clause is present

Open defalut opened this issue 6 years ago • 1 comments

If helper functions (not macros) are used, test markers are shown only at the place where clojure.test/is is present. Like this:

selection_052

With more complicated (or nested) helper functions, usualy placed in different namespaces, this becomes problematic to track what exactly has failed as markers are scattered over many files. This is what I want:

selection_054

Tried to hack it on my own, but was not able to come up with satisfying solution (I cannot redef clojure.test/do-report to my own version as it is already somewhat hacked by closed-source Cursive).

I understand that to define marker tooltips for multiple underlying failures is harder. Do we want to report every failure that happened inside function in tooltip at function call location? Or report just first failure tooltip? But apart from tooltips, this is pretty easy to be defined: Mark every line in stacktrace from is to deftest

defalut avatar Feb 28 '18 15:02 defalut

I am having the same issue (Cursive 1.12.5-2022.3). It is a real productivity drag. We have a big project with a number of test helpers, some of these contain assertions.

holyjak avatar Dec 09 '22 12:12 holyjak