title: how to check onclick function is fired or not in react?
body: <p>Could you please tell me how to check onclick function is fired or not in react?
  I have one button in my demo <code>INCREMENT</code> onclick of button I want to check is <code>onClickHandler</code> function called or not</p>
  
  <p>here is my code
  <a href="https://codesandbox.io/s/oq7kwzrnj5" rel="nofollow noreferrer">https://codesandbox.io/s/oq7kwzrnj5</a></p>
  
  <pre><code>it("check counter increment function is callled", () =&gt; {
      const wrapper = shallow(&lt;Counter /&gt;);
      wrapper.find("button").simulate("click");
    });
  </code></pre>