-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Testing without 'runBlocking' #885
Comments
runBlocking is not present in the common package because JS platform does not support it. In my experience, I had to make a common function Here are the links to my implementations Hope this helps |
This is more or less the thing we do in our tests (+ custom |
Thanks a lot guys! |
What about Native implementation? :/ |
I intentionally omit native implementation because it contains library specific functions but it works exactly like JVM as it implements |
Hi guys, coroutines are awesome 👍
I just started a new multiplatform library project which is based on coroutines, but I have trouble figuring out how I am supposed to write tests using coroutines.
Since most code is in the 'commonMain' sourceSet I would like to write tests for my suspending functions there. Because Kotlin's
@Test
annotation does not support suspending tests and 'runBlocking' is not available in the common module of coroutines, I do not see how I could test those suspending functions in the commonTest module. Did I miss something here?Thanks in advance☺️
The text was updated successfully, but these errors were encountered: