title: How to test a Click event on Echarts using Jest/Enzyme?
body: <p>I have a echarts-for-react bar graph. On barClick, the page redirects to a different url. How do I test for this click event using Enzyme/Jest?</p>
  <pre><code>const handleClick = (params) =&gt; {
    if(params.data){
      let url = get_route(params.value[2])
      window.open(url, &quot;_self&quot;)
    }
    return null
  };
  </code></pre>
  <pre><code>let onEvents = {'click': handleClick};
  
  &lt;ReactEcharts
              option={this.getOption()}
              onEvents={onEvents}
              style={{width: '100%', height: `${height}px`}}
              className='react_for_echarts' 
              /&gt;    
  </code></pre>