testament
testament copied to clipboard
Feature: `each-is`
Add a new macro, each-is:
each-is forms &opt note
forms should be a tuple or array of assertion forms, of the same kind understood by is.
(each-is @[foo bar baz] "note") is equivalent to:
(is foo "note")
(is bar "note")
(is baz "note")
original issue text:
(is @[foo bar baz] note) would be equivalent to (is foo note) (is bar note) ...
Would it be better to have a separate are macro for this? While this looks helpful in the abstract, it also seems to confuse the semantics of is. To be clear, it doesn't have to be are and could be something that makes the relationship to is clearer (e.g. is-multi, is-group, iss, etc).
Yeah, I think that’s right. I’m not a fan of those bdd-style libraries that try to give you an English word for everything you might want to say, but the aim of keeping a simple and consistent semantics for the function itself is quite worthwhile.
Yeah, I'm similar. I'm a worried that are is a little too clever by half. I didn't really like the other alternatives, though. If it was a separate macro, do you have a name you'd prefer? is-all? is-every?
each-is maybe? each is already a word
That one sounds good to me: clear and easy to understand.