Introduction

The ProductsEffects have been defined in such a way that when the loadProductsAction() is dispatched from our application, the loadProducts$ effect detects it by subscribing to the actions$ observable in lines 17–18. Then, in order to fetch the product data, our effects connect to the server in line 19. If the product data isn’t successfully returned from the server, we dispatch another action called getErrorAction in line 21. Let’s unit test this error case.

Get hands-on with 1400+ tech skills courses.