Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我尝试模拟挂起内联函数时,coEvery 似乎挂起。
如果删除内联修饰符,则下面的代码有效
storeApi 中的函数: suspend inline fun getAllStores(): List<Store>
suspend inline fun getAllStores(): List<Store>
测试代码: coEvery { storeApi.getAllStores() } returns allStores
coEvery { storeApi.getAllStores() } returns allStores
我想有一种方法来模拟挂起内联函数,而不仅仅是挂起
Simple answer - no and not possible.