title: Enzyme mount wrapper's containsAllMatchingElements fails to find elements
body: <p>I'm trying to test whether a <code>Menu</code> renders it's <code>MenuItems</code>:</p>
  
  <pre class="lang-jsx prettyprint-override"><code>import React from "react";
  import { configure } from "enzyme";
  import Adapter from "enzyme-adapter-react-16";
  
  import { mount } from "enzyme";
  configure({ adapter: new Adapter() });
  
  const MenuItem = ({ children }) =&gt; &lt;li&gt;{children}&lt;/li&gt;;
  const Menu = () =&gt; (
    &lt;ul&gt;
      &lt;MenuItem&gt;foo&lt;/MenuItem&gt;
      &lt;MenuItem&gt;bar&lt;/MenuItem&gt;
    &lt;/ul&gt;
  );
  
  const HyperMenu = () =&gt; &lt;Menu /&gt;;
  
  const wrapper = mount(&lt;HyperMenu /&gt;);
  
  expect(wrapper.containsAllMatchingElements([&lt;MenuItem /&gt;])).toBeTruthy();
  </code></pre>
  
  <p>though it looks like <a href="https://airbnb.io/enzyme/docs/api/ReactWrapper/containsAllMatchingElements.html" rel="nofollow noreferrer">a valid case</a>, enzyme cannot find any <code>MenuItems</code> and the test fails. Why is that? </p>
  
  <p><a href="https://codesandbox.io/s/18w4o3q713" rel="nofollow noreferrer">codesandbox</a></p>
  
  <p><code>wrapper.debug()</code> spits </p>
  
  <pre class="lang-jsx prettyprint-override"><code>&lt;HyperMenu&gt;
    &lt;Menu&gt;
      &lt;ul&gt;
        &lt;MenuItem&gt;
          &lt;li&gt;
            foo
          &lt;/li&gt;
        &lt;/MenuItem&gt;
        &lt;MenuItem&gt;
          &lt;li&gt;
            bar
          &lt;/li&gt;
        &lt;/MenuItem&gt;
      &lt;/ul&gt;
    &lt;/Menu&gt;
  &lt;/HyperMenu&gt; 
  </code></pre>