Chapter 7
Fixing Anti-Patterns and Practicing Unit Tests
Section 3
Unit Tests for Observable Streams: Rx.BehaviorSubject and Rx.Marbles Techniques
In this video, you will learn different methods of coding unit tests for observables. - Review the difference between writing unit tests for sync and async code in jasmine framework - Review the jasmine done callback for testing async code and introduce virtualTimeScheduler for quick testing of async Rx.JS code that takes some time to run. Understand what Marble testing is and how to implement such tests with TestScheduler - Explore additional possibilities for Rx.JS async-code unit testing in Angular projects: fakeAsync for testing observables and using BehaviorSubject for mocking ngrxStore.