Closed StanleyNavara closed 1 year ago
Hi @StanleyNavara, I've updated my stackoverflow answer.
Are you sure you're using httpBackend
?
We are using HttpBackend indeed, but we have also tried HttpClient before. Both get the same error and it is only during jest tests, not during runtime. Using version 9.2.0.
Edit: We also use a HttpInterceptor, does that matter for tests?
@StanleyNavara well I do go honestly have no clue.
Could you open a question over stackoverflow?
Maybe someone have the answer there
had the "this.handler.handle is not a function" issue today,
it turned out, we didn't update the loader.deps to HttpBackend
TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: HttpLoaderFactory, deps: [HttpClient], // <- HttpBackend }, }),
@umuero Well, closing the issue then :)
Getting the following error when using the library in Jest tests.
Followed this post on SO https://stackoverflow.com/questions/69051268/ngx-translate-multi-http-loader-something-went-wrong-for-the-following-transla but it gave the same errors. I checked and it does enter the HttpInterceptor and read out the header in the test runs.
All the tests are still passing even without the suggestions in the post, but is there a way to get rid of the errors in the test output?