Closed KarmaCop213 closed 1 week ago
HttpInterceptor
works with HttpService
, but ApolloTestingController
does not use HttpService
at all. So it is pretty much impossible have the interceptor reacts to what is going on in the tests using ApolloTestingController
.
Describe the bug
ApolloTestingController
doesn't seem to be triggering anHttpInterceptor
I haveTo Reproduce
I have an
HttpInterceptor
declared like so:and I have call on my code to apollo like this:
on my test I make a call to
this.apollo.mutate<T>({ mutation, variables })
. And to simulate the call, the only way I could find that triggers theHttpInterceptor
is to make a dummy call to an endpoint usingHttpClient
:Expected behavior
From my point of view
ApolloTestingController
should triggerHttpInterceptor
.Environment: