Hi all, how can I mock a function type with MockK?
Copy code
val fn: () -> String? = mockk {
// not working since "invoke()" clashes with invoke() function from MockK
every { invoke() } returnsMany "hello", null
}
d
Dias
08/14/2019, 1:56 PM
this@mockk.invoke()
o
oleksiyp
08/14/2019, 2:28 PM
val fn: () -> String? = mockk()
every { fn() } returnsMany "hello", null