Кнопка испытания на жасмин нажмите

// Define component and fixture within describe()

it('should click button', fakeAsync(() => {
    spyOn(component, 'methodName');

    let btn = fixture.debugElement.query(By.css('.btn-class'));
    btn.triggerEventHandler('click', null);
    fixture.detectChanges();
    expect(component.methodName).toHaveBeenCalled();
}))
Banana in Transit