如果用户使用茉莉花按角度5的shift + Tab键,我需要一个可以调用函数的单元
我尝试了这个,但是我没有调用函数
在我的html文件中,我有这个
<div (keyup.shift.tab)=myFunction($event)"></div>
在我的component.ts中
MyFunction(e){
return "call function"
}
在我的景点
it('call function with shift tab', () => {
event.type = 'keyup';
event.keyCode = 9;
component.MyFunction(event);
expect(component.MyFunction).toHaveBeenCalled();
});