kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
Charlie Briggs 2020-10-29T09:40:58.024800Z

what’s the best way to use deftest/testing with the output capture? I’m writing tests which each produce a lot of output and was wrapping related (but not co-dependent) tests in deftest and then naming each with testing but that results in the output for everything in the deftest block being added to the test output for each failure. It feels like I’m missing something here, should I just use deftest, the downside being worse test names?

plexus 2020-11-02T07:13:55.025900Z

interesting use case @charliebriggs, I guess most people don't use the output capturing that deliberately, it's more a "since this code happened to generate some output maybe you should see it when the test fails." We could add an option to have the output buffer reset for each testing context. Would you mind making a ticket on Github just to track this? if you or anyone else in interested in trying to implement this I'd be happy to give some pointers and help you get started.

Charlie Briggs 2020-11-02T22:01:21.027600Z

Sure, I've raised this: https://github.com/lambdaisland/kaocha/issues/164, thanks for the response

Charlie Briggs 2020-10-29T09:50:30.024900Z

i.e. I was doing:

(deftest v1-updated-events

  (testing "Something about events..."
  ...
  )

  (testing "Something elseabout events..."
  ...
  )
)
but it seems I need to do:
(deftest something-about-events
  ...
)

(deftest something-else-about-events
  ...
)
to get reasonable output, but then I lose the nested test cases and string names