I\'m trying to test the interaction between a host component and a child component in an Angular application. I don\'t know how to get a reference to the child component c
As explained in the guide, host component instance is created with TestBed.createComponent, and child component instance can be selected from debugElement with By helper:
childDebugElement = hostFixture.debugElement.query(By.directive(ChildComponent));
Or:
childDebugElement = hostFixture.debugElement.query(By.css('child'));