Package-level declarations

Types

Link copied to clipboard
class SideEffectTestContext<T>(defaultState: T) : SideEffectContext<T>

Utility class for testing individual SideEffects.

Link copied to clipboard
interface StoreManager<T>

A wrapper around a StoreFlow that allows it to be shut down at the end of a test

Functions

Link copied to clipboard
fun <T> runStoreTest(storeBuilder: CoroutineScope.() -> StoreFlow<T>, context: CoroutineContext = UnconfinedTestDispatcher(), testBody: suspend TestScope.(StoreFlow<T>) -> Unit): TestResult

Creates the StoreFlow defined in storeBuilder using the given context. Then executes the testBody, shutting down the StoreFlow when finished.

Link copied to clipboard
fun <T> TestScope.StoreManager(context: CoroutineContext = UnconfinedTestDispatcher(), storeBuilder: CoroutineScope.() -> StoreFlow<T>): StoreManager<T>

Returns a StoreManager that wraps an instance of the StoreFlow created in storeBuilder

Link copied to clipboard

Utility function for testing an individual SideEffect. Returns the Flow of Action output using the given context as input.