react testing library

Shell
// On Enter key
fireEvent.keyDown(domNode, { key: 'Enter', code: 'Enter', charCode: 13 })

// On A key
fireEvent.keyDown(domNode, { key: 'A', code: 'KeyA', charCode: 65  })

// See keycodes: https://keycode.info/
# Ensure you have react and react-dom installed and run
npm install --save-dev @testing-library/react
Source

Also in Shell: