shared¶
fun <T> shared(
context: CoroutineContext = EmptyCoroutineContext,
display: Display = Display.Short,
block: suspend () -> T
): SharedProvider<T>
Declares a lazily-computed value that is constructed by calling block, and is then shared between all tests.
Most of the time,
preparedshould be preferred to this helper. To learn why, seeShared.
The shared value returned by this function is automatically named after the variable it is stored in.
For more information, see Shared.