title: Enzyme / Jest spies not called onClick
body: <p>I am trying to test an event handler with Enzyme / Jest for a react component, however my spy function is never called...</p>
  
  <p>My component has a div with an id and I am using that to find the dom elem</p>
  
  <pre><code> render() {
      return (
          &lt;div&gt;
              &lt;Top
                  {...this.props}
              /&gt;
              &lt;div 
                  id = 'keyboard_clickable'
                  onClick = {this._handleClick}
                  style= {styles.main}&gt;
                  {this._showKeyBoard()}
              &lt;/div&gt;
              &lt;input onChange = {() =&gt; {}}/&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>My test </p>
  
  <pre><code>describe('onclick function is called ...', () =&gt; {
    it.only('spyOn', () =&gt; {
      const spy = jest.fn()
  
      const wrapper = shallow(
        &lt;Keyboard 
        _getData      = { () =&gt; {} }
        _erase        = { () =&gt; {} }
        _get_letters  = { () =&gt; {} }
        _createWord   = { () =&gt; {} }
        _modeSwitch   = { () =&gt; {} }
        onClick       = { spy      }
        /&gt;
      )
  
      wrapper.find('#keyboard_clickable').simulate('click', {
        target:{
          parentElement:{ id: 5 },
          id:6
          }
      })
      expect(spy).toHaveBeenCalled();
  
    })
  })
  </code></pre>
  
  <p>my HandleClick</p>
  
  <pre><code>_handleClick = e =&gt; {
      let parent = e.target.parentElement;
      if(e.target.id || (!isNaN(parent.id) &amp;&amp; parent.id &gt; 0) ) {
          this.props._getData(e.target.id || e.target.parentElement.id)
          this.setState({status:'ok'})
      }else{
          this.setState({status:'Use numbers between 2 and 9'},()=&gt;{
              return alert(this.state.status)
          })
  
      }
  }
  </code></pre>
  
  <p>Test output</p>
  
  <pre><code>Expected mock function to have been called, but it was not called.
  </code></pre>