Find JUnit 4 coroutine-test @Rule fields

Proprietary

Hand-rolled MainCoroutineRule / CoroutineTestRule patterns predate kotlinx-coroutines-test's Dispatchers.setMain/resetMain helpers. With runTest { } + Dispatchers.setMain(StandardTestDispatcher()) the rule's responsibilities are spread across @BeforeEach/@AfterEach cleanly enough that the rule itself becomes redundant.

org.openrewrite.kotlin.testing.FindCoroutineTestRule$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.testing.FindCoroutineTestRule$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.