<Kotlin Mockk what is the difference between `just...
# stackoverflow
r
Kotlin Mockk what is the difference between `just runs` and `answer {}`? Given a function foo of an object Bar: fun foo(){ // some logic } Using Mockk, in the test of an object that uses Bar, I often see answers {} to specify (with every) the return of foo: internal class FooBarTest { private val barMock = mockk() // ... @Test fun `test something`() = runTest { every { barMock.foo() } answers {} //... } } I would have used just runs, and using just runs in this situation instead of answers {} works fine. What is the...