coGiven

fun <T> coGiven(stubBlock: suspend MockKMatcherScope.() -> T): MockKStubScope<T, T>(source)

Starts a block of stubbing for coroutines in BDD style. Part of DSL. Similar to given, but works with suspend functions.

Used to define what behaviour is going to be mocked.

MockK original function: io.mockk.coEvery

See also