React Enzyme find second (or nth) node
What you want is the .at(index)
method: .at(index) .
So, for your example:
expect(component.find('MyInnerComponent').at(1)).toHaveProp('title', 'Good-bye');
What you want is the .at(index)
method: .at(index) .
So, for your example:
expect(component.find('MyInnerComponent').at(1)).toHaveProp('title', 'Good-bye');