I'm getting error TypeError: Cannot read property 'subscribe' of undefined
on unit test, how to fix it?
part of my code:
Spec
it('makes expected calls', () => {
const item1: item3 = fixture.debugElement.injector.get(item3);
spyOn(comp, 'item5');
spyOn(item1, 'item2');
comp.item4();
expect(comp.item5).toHaveBeenCalled();
expect(item1.item2).toHaveBeenCalled();
});
if I remove this part of spec I get success.
am I using the subscribe() correct way?