lazytest

seancorfield 2025-12-09T20:25:44.313589Z

@nbtheduke Any feelings about reporting the number of assertions in tests? clojure.test: Ran 5 tests containing 23 assertions. lazytest: Ran 5 test cases in 0.02198 seconds.

2025-12-09T21:27:22.421089Z

That requires 1) tracking expect assertions in the test case using some sort of global counter, and 2) being okay with all non-expect assertions not being tracked

seancorfield 2025-12-09T21:45:06.716049Z

Ah, fair enough. I wasn't sure whether that was something "trivial" or not. Not a big deal but it would provide a bit of a "sanity check" as I'm migrating from clojure.test or Expectations 🙂

2025-12-09T22:01:59.784689Z

yeah, i feel you

2025-12-09T22:02:06.180439Z

i considered it!

2025-12-09T22:02:35.826469Z

it's one of the benefits of the "global counter" approach that clojure.test has, and explicitly tying assertion to printing

2025-12-09T22:05:12.377969Z

with lazytest, test cases are opaque functions, so you're stuck with something like (binding [*test-counter* (new-test-counter)] (run-test-case tc)) and then merging the resulting *test-counter* into a per-run counter. that's "fine", for some value of fine, but it felt like it would give a false sense of legitimacy

👍🏻 1