How to test properties and functions on a React component?
<p>I've tried everything with <code>enzyme</code>, however, I can't find the correct way of testing these properties below. Keep in mind that this component is wrapped in a dummy <code>Provider</code> component so that I can pass the necessary props (i.e. <code>Store</code>) down for mounting purposes.</p>

<p>1) After mounting, a property is set on the instance (e.g. <code>this.property</code>)</p>

<p>2) An event listener has been added</p>

<p>3) On the event listener, <code>someFunction</code> is being called</p>

<pre><code>class SampleComponent extends Component {

  componentDidMount() {
    this.property = 'property';
    window.addEventListener('scroll', this.someFunction, true);
  }

  someFunction = () =&gt; {
    return 'hello';
  };

  render() {
    return &lt;h1&gt;Sample&lt;/h1&gt;; 
  }
}

export default EvalueeExposureList;
</code></pre>