title: Enzyme Test for React Lazy Load
body: <p>I can see from <a href="https://stackoverflow.com/a/62765999">this question</a> and the <a href="https://github.com/enzymejs/enzyme/pull/1975#issuecomment-783579528" rel="nofollow noreferrer">resulting conversation on github</a>, that I should be looking at the <a href="https://github.com/enzymejs/enzyme/pull/1975/files" rel="nofollow noreferrer">merge</a> on how to do some tests for lazy loading. The docs don't provide any examples for either shallow or mount.</p>
  <p>I've tried the follow, however I still can get it to work.</p>
  <pre><code>describe(&quot;When the view is mounted&quot;, (): void =&gt; {
      let wrapper: ShallowWrapper;
      const View = lazy(() =&gt; import(&quot;../../../components/view&quot;));
      beforeEach((): void =&gt; {
          wrapper = shallow(
              &lt;Suspense fallback={&quot;loading&quot;}&gt;
                  &lt;View /&gt;
              &lt;/Suspense&gt;,
              { suspenseFallback: false },
          );
      });
      it(&quot;Then it returns the component&quot;, (): void =&gt; {
          expect(wrapper).toMatchSnapshot();
      });
  });
  </code></pre>
  <p>The snapshot returns</p>
  <pre><code>&lt;Suspense
    fallback=&quot;loading&quot; 
  &gt;
    &lt;lazy /&gt;
  &lt;/Suspense&gt;
  </code></pre>
  <p>Ideally I'd like to use mount, instead of shallow, so I can test the lazy component's content. What am I missing?</p>
  <p>What am I missing?</p>