Я пытаюсь написать контрольный пример для вызова метода
spec.ts
it('should be call openMoreOptions method', async() => {
spyOn(component, 'openMoreOptions').and.callThrough()
component.openMoreOptions()
expect(component.openMoreOptions).toHaveBeenCalled();
})
component.ts
openMoreOptions() {
this.moreMenu.enable(false, 'menuSearch');
this.moreMenu.enable(true, 'menuMore');
this.moreMenu.enable(false, 'menuTickets');
this.moreMenu.toggle()
}