kaocha
kaocha copied to clipboard
Support for expectations
Expectations is a minimalist testing framework built around the expect
macro. (source)
(expect 1 1)
(expect #"foo" "boofooar")
(expect ArithmeticException (/ 12 0))
(expect :foo (in #{:foo :bar}))
Note that expectations has two "modes", a newer one based on clojure.test (defexpect
~= deftest
), and the original one, which is completely seperate from clojure.test
. The former one should work just fine with Kaocha's :kaocha.type/clojure.test
, the latter is what this ticket is about.
Since expect
just defines a var with metadata ^{:expectation true}
, implementing the load step should be straightforward and largely mimic the clojure.test ns/var approach. To implement the run step we'll have to figure out how to capture pass/fail/error events from expectations and convert them into clojure.test/do-report
style events.
I spoke with Arne about this, and given that it's been two years, we're probably not going to support classic expectations.
Yes, to elaborate a bit more, clojure.test based expectations should work out of the box. If it doesn't or behaves weirdly then please file an issue and we can look into it. Classic expectations should be easy enough to support, as mentioned above, but no one has ever asked for it, and presumably people are generally moving away from it, so we are not going to allocate resources to it.
We would be happy to accept a community contribution for this though, and are available to help anyone willing to work on that.
Closing as "wontfix" as explained above.