title: ReactJS & Enzyme: Matching elements contents to string
body: <p>I have simple Intro component in React.js which renders a h1 and a p.</p>
  
  <p>I am trying to write a test for the passed h1 &amp; p strings with Enzyme but I'm unable to do this. What is wrong with this code?</p>
  
  <pre><code>it('description of element is okay &lt;p&gt;', () =&gt; {
    const wrapper = shallow(&lt;Intro title="Heading of element" description="Description of element" /&gt;);
    expect(wrapper.find('p').text().to.contain("Description of element")); // This is not working!
  });
  </code></pre>
  
  <p>If I console log the <code>wrapper.find('p').text()</code> it's not undefined... And yet the console says like this:</p>
  
  <pre><code>  1) (Component) Intro contains a single &lt;p&gt;:
   TypeError: Cannot read property 'contain' of undefined
    at Context.&lt;anonymous&gt; (test/components/alerts/alert.spec.js:19:12)
  </code></pre>