diego-gomez-olvera
09/22/2021, 12:39 PM@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?Mattia Tommasone
09/22/2021, 12:41 PMmockkStatic(Obj::extensionFunc)
or
@file:JvmName("KHttp")
which has indeed the problem that it is not safe towards class renaming, you’re rightdiego-gomez-olvera
09/22/2021, 1:03 PMJustin Tullgren
09/24/2021, 6:30 PM