You are directly invoking MutableSharedFlow. It has this signature:
public fun <T> MutableSharedFlow(
replay: Int = 0,
extraBufferCapacity: Int = 0,
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND
): MutableSharedFlow<T> {
when you use curly braces you are passing a last argument, which requires type of
onBufferOverflow: BufferOverflow
, so it complains about that type.
so try something like
val triggerValue = MutableSharedFlow<String>()
@Test
fun `some test name here`() = runTest {
every { // I think it does not need coEvery, but not sure
triggerValue as Flow<String>
} returns flowOf("123")
}