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
-
Hello, I am migrating from I see there is marble-testing but I'm looking for something more simple or similar to how it was done in dart. For example in RxDart, it was very intuitive using expect with https://github.com/ReactiveX/rxdart/blob/master/test/streams/sequence_equals_test.dart#L7-L12 Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.