title: React/enzyme - How to test reference function
body: <p>I have a component that contains input that has assigned function to ref and I try to write test for it:</p>
  
  <pre><code> &lt;input
     id="input-element"
     type="checkbox"
     checked={isChecked}
     ref={(input) =&gt; {
         if (input) {
             input.indeterminate = true;
         }
     }}
     className="checkbox" /&gt;
  </code></pre>
  
  <p>And my question is how check in test if the input indeterminate is set to true. Documentation <a href="https://airbnb.io/enzyme/docs/api/ReactWrapper/ref.html" rel="nofollow noreferrer">https://airbnb.io/enzyme/docs/api/ReactWrapper/ref.html</a> didn't help me because there are only very simple and useless examples. </p>
  
  <p>I tried to test it so:</p>
  
  <pre><code>const wrapper = shallow(&lt;MyComponent {...props}/&gt;);
  expect(wrapper.find('#input-element').prop('indeterminate')).toBeTruthy();
  </code></pre>
  
  <p>But <code>wrapper.find('#input-element').prop('indeterminate')</code> returns me <code>undefined</code></p>