I am writing an Angular 2 unit test. I have a @ViewChild subcomponent that I need to recognize after the component initializes. In this case it\'s a Timepicke
@ViewChild
Timepicke
In most cases just add it to declaration and you are good to go.
beforeEach(async(() => { TestBed .configureTestingModule({ imports: [], declarations: [TimepickerComponent], providers: [], }) .compileComponents()