jmfayard
06/16/2022, 6:26 AMrunTest { ... }
hack
The issue is there https://github.com/junit-team/junit5/issues/1914
but very little happened since 3 years
I created an issue, please star ⭐️ https://youtrack.jetbrains.com/issue/KT-52818/Provide-a-quick-fix-against-using-suspending-functions-in-Unit-Teststojan
06/16/2022, 10:31 AMjmfayard
06/16/2022, 10:32 AMephemient
06/16/2022, 11:56 AMjmfayard
06/16/2022, 12:27 PMephemient
06/16/2022, 6:33 PM@kotlinx.test.Test suspend fun
• a JUnit5 extension could wrap every test in runTest
and inject scope/continuation parameters, but it can't change test discovery, which means no way around JUnit ignoring all suspend funsjmfayard
06/17/2022, 8:47 AM@Test
from kotlin.test
doesn't work,
it always import org.unit.jupiter.api.Test
which doesn't give me the error,
unless I expeclitely type @kotlin.test.Test
which is not very convenient....ephemient
06/20/2022, 10:59 PMclass ExampleTest : CoroutineTest {
@Test
suspend fun test() {
println("OK")
}
}
jmfayard
06/21/2022, 12:58 AM