Я тестирую угловой сервис, который использует Apollo и graphql, я получаю Нет провайдера для HttpClient! Ошибка, даже если я добавляю HttpClientTestingModule в импорт ..
rules.spec.ts
import { PlatformGraphQLService } from 'platform-graphql'
import { TestBed, ComponentFixture } from '@angular/core/testing'
import { RulesService } from './rules.service'
import {
ApolloTestingModule,
ApolloTestingController
} from 'apollo-angular/testing'
import { async } from '@angular/core/testing'
import { HttpClientTestingModule } from '@angular/common/http/testing'
import { Apollo, ApolloModule } from 'apollo-angular'
describe('RulesService', () => {
let controller: ApolloTestingController
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
ApolloTestingModule,
HttpClientTestingModule,
],
providers: [
PlatformGraphQLService,
],
})
controller = TestBed.get(ApolloTestingController)
})
it('should be created', async(() => {
const service: RulesService = TestBed.get(RulesService)
expect(service).toBeTruthy()
}))
})