hey there! Is anyone aware of issues with mockk an...
# mockk
m
hey there! Is anyone aware of issues with mockk and Kotlin 1.9.0? I'm observing a curious situation where it looks like the implementation of a function isn't actually replaced by any mock: all the places where it's referenced (blocks of
coEvery
,
coVerify
and the class under test that tries to use the mock) ends up calling the actual implementation (verified by setting a breakpoint) and breaking because the mocked class actually hasn't been initialised at all (as one would expect). Having used mockk extensively in the past, the only explanation I can think of at the moment is that this is the only project with Kotlin 1.9.0 which, contrary to 1.8.20, isn't mentioned in the release notes anywhere.
I managed to narrow down to the original cause: if I change the constructor argument from a
NonEmptySet
(Arrow 1.2) to a regular
Set
, the class can be mocked just fine. Gonna create an issue for it and try to come up with a minimal reproducer.