How to verify that a top level (static) function was called in a test with MockK?
Simple approach like:
verify { someTopLevelFunction("some text") }
results in io.mockk.MockKException: can't find stub kotlin.Unit.
How to verify that a top level (static) function was called in a test with MockK?
Simple approach like:
verify { someTopLevelFunction("some text") }
results in io.mockk.MockKException: can't find stub kotlin.Unit.
Copyright © 2021 Jogjafile Inc.
You would mockk the same way you mockk extension functions https://mockk.io/#extension-functions
In practice generally: