Test combine? #78
-
Hi, is there a way to test combine of flows with turbine? If yes, can you give me an example on how to do it? Would be great! Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
JakeWharton
Nov 19, 2021
Replies: 1 comment
-
The output of combining multiple flows is just a single flow, and Turbine tests single flows. I would expect an example to look like combine(flowOf("a"), flowOf("b"), ::Pair).test {
assertEquals(Pair("a", "b"), awaitItem())
} but I haven't tested it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
filnik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output of combining multiple flows is just a single flow, and Turbine tests single flows.
I would expect an example to look like
but I haven't tested it.