-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Testing contexts (see here, here, and here) are useful for pinpointing what causes failures in clojure.test cases. It seems that when running tests through Cursive (i.e. the Run ... in REPL action), this information is not available anywhere in the output (either in the REPL output window, or in the error markers showing the diffs).
Consider the following
;; buggy on purpose
(defn- is-even? [x]
(> x 17))
(t/deftest contexts-test
(t/testing "is-even? works as expected"
(doseq [[exp val] [[true 2]
[false 17]
[true 100]]]
(t/testing (format "%d produces %b" val exp)
(t/is (= exp (is-even? val)))))))
When deps.edn is set up with the Cognitect test runner, as outlined here, the output of clj -X:test shows them, ex:
Testing my.project.whatever-test
FAIL in (contexts-test) (engine_test.clj:25)
is-even? works as expected (2 produces true)
expected: (= exp (is-even? val))
actual: (not (= true false))
Contrast with the local REPL output shown in Cursive
Running my.project.whatever-test/contexts-test
Ran 1 test containing 3 assertions.
1 failure, 0 errors.
Notice the contexts do not show up anywhere.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels