cursive
cursive copied to clipboard
Test failure details are not reported in some cases
- Some test failure details are not surfaced by Cursive (missing gutter icons / hover-for-diff functionality), preventing me from understanding what failed and how
- Issue seems related to a test helper I'm using which is like
is, but re-throws exceptions/errors - This issue occurs regularly when running tests in the codebase I work on which use this helper
- I've made two minimal reproduction cases, and they are weird/sensitive, requiring some forms / comments interspersed throughout the tests
(ns cursive-test
(:require
[clojure.test :refer :all]))
(defmacro try-expr!
"Like clojure.test/try-expr, but re-throws exceptions/errors"
[msg form]
`(try
~(clojure.test/assert-expr msg form)
(catch Throwable t#
(clojure.test/do-report
{:type :error :message ~msg :expected '~form :actual t#})
(throw t#))))
(defmacro is!
"Like clojure.test/is, but re-throws exceptions/errors."
[form msg]
`(try-expr! ~msg ~form))
(deftest cursive-inlay-issue-a-test
(is (= 1 2))
#_(do
;
)
(is! true "true")
:arbitrary)
(deftest cursive-inlay-issue-b-test
(is (= 1 2))
#_(do
;
)
(is! false "false")
())
This is with:
IntelliJ: IntelliJ IDEA 2024.1.4 (Ultimate Edition), Build #IU-241.18034.62, built on June 20, 2024
Cursive: 1.13.4-eap6-2024.1