Chapter 13: Testing RxJS Observables

Many developers consider testing observables a challenging task. This is true. But if you learn the right techniques, you can implement maintainable and readable tests in a very effective manner.

In this chapter, we will walk you through three commonly used patterns for testing streams. We will start by explaining the subscribe and assert pattern, after which we will discuss the marble testing pattern. Finally, we will highlight a suitable pattern for testing streams that are returned from HTTPClient by focusing on a concrete example in our Recipe app.

In this chapter, we're going to cover the following main topics:

  • Learning about the subscribe and assert pattern
  • Learning about the marble testing pattern ...

Get Reactive Patterns with RxJS for Angular now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.