Turbine 1.0 is a Kotlin library from Cash App that simplifies testing of kotlinx.coroutines Flow by converting push-based Flows into pull-based suspend functions. The API provides awaitItem(), awaitComplete(), and similar calls that suspend until the expected event arrives, throwing AssertionError on mismatches or timeouts. Beyond Flow, standalone Turbine instances can wrap other push-based mechanisms like callbacks, making it easy to create fakes for loggers or other event sources. The library also supports multiple Turbines, shared timeouts, and error aggregation for more complex testing scenarios.

2m read timeFrom code.cash.app
Post cover image