Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
RxJS unit testing in Angular application. The whole picture.
Rating: 4.3 out of 5(139 ratings)
7,092 students

RxJS unit testing in Angular application. The whole picture.

I will make you understand the system - the system of RxJS unit testing tools in Angular applications.
Last updated 10/2019
English

What you'll learn

  • In-depth look in RxJS unit testing
  • All possible methods to do unit tests for RxJS code in Angular
  • Simplest async testing with Jasmine 'done' callback
  • Testing by using virtual time (RxJS VirtualTimeScheduler) and fake time (Angular fakeAsync helper)
  • How to avoid additional arguments in methods under test by using AsyncScheduler/delegate trick
  • What is difference between VirtualTimeScheduler and TestScheduler
  • What is marble testing and how to use progressive time syntax in marble diagrams
  • How to reduce code boilerplate by using wrapper libs like jasmine-marbles and rxjs-marbles
  • What is difference between testing with TestScheduler flush() and new TestScheduler run() method?
  • Angular demo project with all reviewed code

Course content

4 sections11 lectures54m total length
  • Introduction2:04

    Introduction

  • RxJS Schedulers5:40

    Before we start diving into unit testing - we should clarify what are schedulers in RxJS

    You already know that Observables produce values over time. And the moment when exactly value will be emitted is controlled by special entity - scheduler.

    Knowing how schedulers work are extremely important in understanding how to unit test you async code

    Possibly you already know that topic - but plz don’t skip - recalling that will help us to be on the same page.

Requirements

  • Intermediate-advanced level of RxJS
  • Intermediate-advanced level of Angular

Description

If you already tried to code unit tests for Observables - then you may be overwhelmed with a variety of methods on how to do that.

Which one is right for you?

Will it be jasmine with 'done' callback which we usually use for async code?

Or maybe TestScheduler?

Or you are going to use jasmine-marbles which is being mentioned in official Angular documentation?

I am not even naming other methods.

What is common for them and where they differ? How to put all of them in one solid picture in your head?

This is what I am going to do in my lessons - I will make you understand the system.

Who this course is for:

  • Intermediate-advanced Angular developers
  • RxJS enthusiasts