title: How can I mock an `instanceof` test?
body: <p>In my React code, I listen for a FocusEvent, and perform a check on the type of the element that is being focused:</p>
  
  <pre><code>function onBlur(event) {
      if(event.relatedTarget instanceof HTMLInputElement) { /* ... */ }
  }
  </code></pre>
  
  <p>This works fine. I just don't seem able to write a proper unit test for it though... I figured I'd be able to call the <code>onBlur</code> method as follows:</p>
  
  <pre><code>onBlur({ relatedTarget: new HTMLInputElement() });
  </code></pre>
  
  <p>...but unfortunately, that results in an error:</p>
  
  <pre><code>TypeError: Illegal constructor
  </code></pre>
  
  <p>I'm using Jest and Enzyme (which I think uses jsdom?), if that matters.</p>
  
  <p>How best to approach this?</p>