Have there been any changes to exceptions matchers...
# kotest
w
Have there been any changes to exceptions matchers in 4.4.0? Some of our tests started failing and it turns out previously the exceptions that we compared didn’t have matching
cause
. Is there an issue I can read to see what’s changed exactly?
s
shouldThrow ?
w
We had something like
Copy code
val exception = shouldThrowAny { /* code */ }

it("should throw $expected") {
    exception shouldBe expected
}
exception shouldBe expected
started failing now
s
Is it correctly failing now and wasn't before ?
w
Yes 🙂
s
So it's an improvement 🙂
but I'm not sure of anything that changed
w
It is 🙂 I’m just looking to see what changed to better understand how it impacts other tests we might have
s
let me check the code
Last changes 31st may
s
oooooh
w
Actually not sure yet this is it, but it seems relevant (our exception is a data class for some reason)
s
you had data class exceptions
yeah
w
Oh yeah, so previously we’d just check the message & instance as per
ThrowableEq#equals
now we’re checking the entire class 👍 Thanks 🙂
s
Yeah, I suppose that was a bug / oversight
glad it's been fixed
@Ashish Kumar Joy swoops in and fixes all the bugs :)
🙏 1