title: React/JestJS/Enzyme: How to test for ref function?
body: <p>I'm running unit tests using Jest and Enzyme for this very simple component <code>render()</code>:</p>
  
  <pre><code>render() {
    return (&lt;Input
      id='foo'
      ref={input =&gt; { this.refInput = input }}
    /&gt;)
  }
  
  it('should render Input', () =&gt; {
    wrapper = shallow(&lt;Component /&gt;)
    expect(wrapper.find(Input)).toHaveLength(1)
  })
  </code></pre>
  
  <p>I'm also using the coverage option of Jest and there I see, that the line </p>
  
  <pre><code>ref={input =&gt; { this.refInput = input }}
  </code></pre>
  
  <p>is not covered by my test. What do I have to do to get a full covered unit test for this sample component?</p>