Naive Testing Approach
Start testing Observable streams using the naive testing approach.
So far, you have learned that Observables are lazy; they start emitting values only when an Observer is subscribed to it. So, how do you test a lazy Observable? The answer is simple: you simply subscribe to the Observable and expect the right values. Let’s analyze the following code:
Get hands-on with 1200+ tech skills courses.