Angular 7: Test Error Interceptor

Testing an error interceptor can be a little tricky. Below is the code I want to test :



Basically we need to perform an HTTP request and respond with a mocking error for testing this interceptor. You need also to register it in the TestBed.configureTestingModule.



Thanks for sharing...

Comments

Popular posts from this blog

Spring JPA : Using Specification with Projection

Chip input using Reactive Form