mockk / mockk

mocking library for Kotlin
https://mockk.io
Apache License 2.0
5.34k stars 335 forks source link

`coVerifyCount` accepts a non-suspending lambda #1275

Open dzirbel opened 5 days ago

dzirbel commented 5 days ago

Expected Behavior

coVerifyCount should allow suspending functions in its verifyBlock lambda.

Current Behavior

coVerifyCount does not allow suspending functions in its verifyBlock lambda. It has an identical definition to verifyCount:

fun coVerifyCount(verifyBlock: MockKCallCountCoVerificationScope.() -> Unit)

That being said, I don't understand how the test passes (or even compiles). I haven't tried to reproduce from a local checkout of mockk.

Context