title: Method “simulate” is meant to be run on 1 node. 0 found instead. - onClick
body: <p>Here are  2 events using onClick  that I am trying to run a test and make sure they pass. I am using Jest and enzyme - ReactJS</p>
  
  <p>What am I missing ?</p>
  
  <p>event 1:</p>
  
  <pre><code> &lt;td&gt;
   &lt;div className={'add-header-green'}  id='test-greenheader'onClick={ ()=&gt;{this.handleChangeOnBlur()} }&gt;+&lt;/div&gt;
  </code></pre>
  
  <p>Event 2</p>
  
  <pre><code> &lt;td&gt;
   &lt;img className='remove-header' src={closeImg} id='test-closeimg' onClick={ ()=&gt;{this.props.removeParameters(this.props.id)} } /&gt;
  </code></pre>
  
  <p>For both tests I am getting the same error: </p>
  
  <pre><code> Method “simulate” is meant to be run on 1 node. 0 found instead.
  </code></pre>
  
  <p>here are my test files for :
  test1:</p>
  
  <pre class="lang-js prettyprint-override"><code>it('should call shandleChangeOnBlur method  on click event', () =&gt; {
    // Reset info from possible previous calls of these mock functions:
    baseProps.onClick.mockClear();
    wrapper.setProps({});
    wrapper.setState({
      name: '',
      value: '',
      localState: true
    });
    wrapper.find('#test-greenheader').simulate('click', { target: { name: 'value' } });
  });
  </code></pre>
  
  <p>test2:</p>
  
  <pre class="lang-js prettyprint-override"><code>it('should call removeParameters function on button click', () =&gt; {
    baseProps.removeParameters.mockClear();
    wrapper.setProps({});
    wrapper.find('#test-closeimg').simulate('click');
    expect(baseProps.removeParameters).toHaveBeenCalled();
  });
  </code></pre>