Now let’s create the service that will be responsible for fetching the posts from the server. Build the Posts Service — We need to listen to GET_POSTS action, then call our service and based on the response status to do the following thing: If the response is successful, dispatch GET_POSTS_SUCCESS action with the result.If the request fails, dispatch GET_POSTS_FAIL action with the error.These are
![Unit Test Your ngrx/effects in Angular](https://cdn-ak-scissors.b.st-hatena.com/image/square/326b2c9808fd2c1eb57060c3a4c7d6e01d6fc7a5/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A1200%2F1%2ABAwGPbHNLT9irNwNE-EIlw.png)