New to testing, how would I test this method with Mocha, Chai, Enzyme, and Sinon? : <p>Here's my method</p>

<pre><code>  handleKeyEvent(event) {
    const code = event.keyCode;

    if (UsedKeys.includes(code)) {
      event.preventDefault();

      if (code === KeyCodes.DOWN) {
        this.modifyIndexBy(1);
      } else if (code === KeyCodes.UP) {
        this.modifyIndexBy(-1);
      }
    }
  }
</code></pre>

<p>I'm still pretty new to testing, and I have no idea how I'd go about testing this piece. 
The method takes an event, so do I have to synthesize an event object and pass it in? </p>

<p>After that, do I just somehow test that <code>this.modifyIndexBy()</code> gets called? </p>

<p>This method doesn't return anything. Do I modify my code to be more testable?</p>
