Summary
There is no perfect solution for every use case. In this chapter, I tried to show you the common solutions that are available in RxJS and Angular for testing observables. And you can choose the solution that fits your project best. First, we learned about the subscribe and assert pattern, as well as its advantages and drawbacks.
Then, we learned about the marble testing pattern, its syntax, features, advantages, and drawbacks. We studied a basic example and an example that uses virtual time to test timed observables.
Finally, we learned about a pattern we can use to test streams that are returned from the HTTP client. Now that you know about the common techniques that are available in the Angular/RxJS ecosystem (without having to add a third-party library), it is up to you to pick the right technique for the right use case.
This was our last pattern and our journey into reactive patterns has come to an end. I tried to highlight the most-used reactive patterns that...