Book Image

Hands-On RxJS for Web Development [Video]

By : ALEXANDER POSHTARUK
Book Image

Hands-On RxJS for Web Development [Video]

By: ALEXANDER POSHTARUK

Overview of this book

Web application code can get tangled up, which makes it hard to test and maintain. Also, asynchronous computations and HTTP requests have to be properly managed. However, with RxJS 6 you can unify, filter, and transform these streams with ease. By introducing RxJS 6 into your code, you can build clean and fault-tolerant web applications. This course shows you how to handle work tasks and issues with RxJS 6. It helps you develop the skills you need to create Reactive applications with RxJS 6. With this course, you'll enter the Reactive world by using Angular and vanilla JS. You will learn to execute asynchronous event handling techniques using RxJS 6. By the end of the course, you'll be saving precious development time by using RxJS 6. You'll scale your own applications effectively, and use Angular framework that relies on RxJS 6. All the code and supporting files for this course are available at https://github.com/PacktPublishing/Hands-on-RxJS-for-Web-development
Table of Contents (7 chapters)
Chapter 7
Fixing Anti-Patterns and Practicing Unit Tests
Content Locked
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.