title: How to test for a map result of a React render function in Enzyme?
body: <p>This is how I get an array of Dropdown.Item elements returned in my react component.</p>
  
  <pre><code>render () {
    const { data } = this.props
  
    if (data) {
      return data.map((item, index) =&gt; {
        return &lt;Dropdown.Item
          text={item.title}
          key={index}
        /&gt;
      })
    }
    return null
  }
  </code></pre>
  
  <p>Now I'm trying to test for the returned result, but my test fails with <code>recieved.length: 0</code>.
  I think the issue is returning a map... How do I have to test for that?</p>
  
  <pre><code>it('should render dropdown items', () =&gt; {
    wrapper = shallow(&lt;Component data={data} /&gt;)
    expect(wrapper.find(Dropdown.Item)).toHaveLength(2)
  })
  </code></pre>
  
  <p>My data looks like:</p>
  
  <pre><code>[ { _id: '1', title: 'Item 1' }, { _id: '2', title: 'Item 2' } ]
  </code></pre>
  
  <hr>
  
  <p><em>Update</em></p>
  
  <p>This is working for me:</p>
  
  <pre><code>expect(wrapper.at(0).find(Dropdown.Item)).toHaveLength(2)
  </code></pre>
  
  <p>But why do I have to use <code>at(0)</code>?</p>