Skip to content

What is the best & easy way to write tests to know that an observable emits N values in order? I would like to do it like in RxDart #7101

Answered by kwonoj
MiniSuperDev asked this question in Q&A
Discussion options

You must be logged in to vote

Marble testing is not a mandatory requirement, you could grab values via subscribing test scheduler and compare values. There are 3rd party testing framework like rx-sandbox (https://github.com/kwonoj/rx-sandbox#getting-values-from-observable) as well allows to use plain testmessage assertion.

disclaimer: I wrote rx-sandbox.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kwonoj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants