Is there a `shouldRaiseAccumulate` and `shouldNot...
# arrow
u
Is there a
shouldRaiseAccumulate
and
shouldNotRaiseAccumulate
to test error-accumulating functions? Or do I always need to wrap my block in another
accumulate {..}
when testing?
a
This is more in the realm of matching libraries; Kotest provides one, but it would be nice to have support for more
u
Ah right. Unfortunately, kotest-assertions does cover
Raise
only, not
RaiseAccumulate
.
y
You could also use
iorAccumulate
and assertions on that, akin to using
either
for testing
Raise
In fact, it'll give you slightly more info than just wrapping your code in `accumulate`:
accumulate
fails on any raised error, while
iorAccumulate
does not. For an analogy,
accumulate
turns your
Ior
into an
Either
by turning
Both
into
Left
r
I don't remember if the https://github.com/assertj/assertj-arrow-core has one, but in case you can open an issue 😬