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