Find JUnit 4 coroutine-test @Rule fields
ProprietaryHand-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$KtRecipemod 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.