title: How to add unit test for window keydown event in ReactJS with enzyme
body: <p>I have the following code in my React component. On pressing escape key, unfocus prop function should be called. How do I test this? I am using jest and enzyme.</p>
  
  <p><a href="https://i.stack.imgur.com/RYPTr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RYPTr.png" alt="reactjs enzyme test"></a></p>
  
  <p>Thanks for the help</p>