cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
588 stars 7 forks source link

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

Open defalut opened 6 years ago

defalut commented 6 years ago

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

holyjak commented 1 year ago

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.