标签: angular jasmine keydown
有人知道如何在茉莉花的angular4 +单元测试中模拟keydown.arrowdown吗?
我尝试了searchElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowDown' }));,但是它不起作用。
searchElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowDown' }));