https://kotlinlang.org logo
Title
j

Jordan Haven

03/22/2023, 4:07 PM
Long shot, but has anyone had any success using mockk with React-Native? I have an extension method on a data class that returns a WritableNativeMap (defined in react-native), but can't seem to mock it, as it's constructor calls a (private) native method, and i'm getting `UnsatisfiedLinkError`s
public data class MyResult(code: String)

public fun MyResult.toWritableNativeMap() = WritableNativeMap().apply {
    putString("result", code)
}
j

Jordan Haven

03/22/2023, 4:10 PM
ah interesting, i'll have a look, thanks