It seems that a recommended way to mock extensions with Mockk is to define a @file:JvmName
and refer to it with mockkStatic("<jvm-name>")
, which is not type safe: In case of refactoring (e.g. rename or package change), the tests might break inadvertently. Is there a more type safe manner to mock extension functions?
0 Replies