I'm staring up an Angular 5 project and it auto-generated some spec unit tests for my components and services. For those components that require Apollo I'm getting an error NullInjectorError: No provider for Apollo!
I added the Apollo module to the import and declare section like so:
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ContractsDashboardComponent, Apollo ]
})
.compileComponents();
}));
However now I get the error
Failed: Unexpected value 'Apollo' declared by the module 'DynamicTestModule'. Please add a @Pipe/@Directive/@Component annotation.
In the normal app I have a module GraphQLModule that calls apollo.create in the constructor. Should I mock that somehow as well?