title: React testing error Cannot log after tests are done. Did you forget to wait for something async in your test?
body: <p>I have a functional component which I am trying to test and there seems to be some issue around the endpoint call via axios.</p>
  <pre><code>const url = user.myUrl + &quot;/someEndpoint&quot;;
  const RESPONSE = await axios.post(url);
  console.log(&quot;RESPONSE ::::::::::::::::::::::::&quot; + RESPONSE);
  </code></pre>
  <p>The test is as below;</p>
  <pre><code>test(&quot;Validate something&quot;, async () =&gt; {
      const {container} = render(
              &lt;MyComponent url={url} /&gt;
      );
      expect(await container.getElementsByClassName('someGrid').length).toBe(2);
  });
  </code></pre>
  <p>When I run the test, I get the below error;</p>
  <pre><code>Cannot log after tests are done. Did you forget to wait for something async in your test?
      Attempted to log &quot;RESPONSE ::::::::::::::::::::::::[object Object]&quot;.      
  </code></pre>
  <p>PS: I am mocking endpoints via msw.</p>