-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No answer found for: ...continuation {})
#957
Comments
I got the same error with the example
log
In my case solution was
It seems usage of mock entity and then pass their properties in method arguments produces such error. |
@igorwojda I am facing the same issue and have not solved yet. have you solved this issue? |
Not solved |
okay |
Same for me, mockk 1.13.5. |
@igorwojda The issue is with the Dispatcher rule made for suspend functions. working fine for me. use the below code and define this rule into your viewmodel test class. @OptIn(ExperimentalCoroutinesApi::class)
} |
@deepakkumar-mahindra you are using JUnit4. |
My experience with this has been weird, but I want to share in case is useful for somebody: |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Mockk handles the implicit
continuation
parameterCurrent Behavior
Method mock is not working
Failure Information (for bugs)
Steps to Reproduce
I could not extract this issue into a self-contained code sample, however, I have created a dedicated branch in my project where you can quickly reproduce this issue:
https://github.com/igorwojda/android-showcase/tree/mockk-continuation-no-answear-bug
AlbumDetailViewModelTest
class@Disabled("mockk can't correctly mock this function")
annotationonEnter album is not found
testContext
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Stack trace
The text was updated successfully, but these errors were encountered: