I\'m trying to simulate a keyDown event, specifically for Enter, keyCode: 13. I\'ve tried a number of different ways of doing this, but none of them ar
keyDown
keyCode: 13
I'm using 'shallow' mount (Enzyme 3.7.0 with Jest 23.6.0). This work for me:
const input = wrapper.find('input'); input.simulate('change', { target: { value: 'abcdefg'} }); input.simulate('keydown', { keyCode: 13 });