Hi guys! :slightly_smiling_face: We recently updat...
# mockk
j
Hi guys! 🙂 We recently updated mockk from
1.13.2
to
1.13.5
and we started having issues with some of our espresso tests (we have a bunch of mocked classes injected in those with
Koin
):
java.lang.IncompatibleClassChangeError
(zero problems in our ~2000 unit tests though) We could fix some of those by replacing the type of the mock with the concrete implementation eg
val mockedClass = mockk<Interface>()
by
val mockedClass = mockk<Implementation>()
But that doesn’t work for libraries that generate code from interfaces eg Retrofit
val mockBackendApi = mockk<BackendApi>
and we were stuck with the
IncompatibleClassChangeError
for those I know it is a bit vague so let me know if I can provide additional details. For now, we reverted back to 1.13.2, the tests are running like they used to but I’m curious if this is a mockk thing or if it’s just highlighting a problem that was already in our codebase Thanks! 🙂
j
Exactly the same error! Damn, I did search the github for issues before posting, guess I was a bit too quick 🤦 😅 Thanks 🙏