camsaul / humane-are

Drop-in replacement for clojure.test/are with better error output and better arg validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`humane-are.core-test` suggestions

vemv opened this issue · comments

commented

Hi! Great-looking lib, I'm a heavy arer myself.

A couple suggestions for increasing my confidence in it:

  • In t/deftest are-test, you can also assert (is (= x (macroexpand ,,,))) i.e. set expectations for what the macroexpansions should be
  • You can assert that no false positives are raised
    • placing is somewhere deeply nested (vs. top-level) is ok.
    • top-level testing is OK if it has a true at tail position.
      • this is a pattern that clj-kondo and Eastwood understand.
      • this allows for custom testing strings that are not simply the arguments already provided by are+

Hope it helps!

Cheers - V

@vemv those are great ideas, any interest in submitting a PR?

commented

I lack the bandwidth these days, sorry!