title: React testing library - await findBy* vs promise.then
body: <p>I have a test where I await for some text to be shown:
  <code>const allTodosPromise = findByText('All Todos')</code></p>
  <p>My test actually checks if the HTMLElement returned has some style (to see if it is active or not):</p>
  <p><code>expect(await allTodosPromise).toHaveStyle(activeItemStyle);</code>
  which fails with message &quot;Unable to find an element with the text 'All Todos'...&quot;.</p>
  <p>But, if I resolve my promise with a <code>then</code> the test passes, like:</p>
  <pre><code>   allTodosPromise.then(htmlElement =&gt; 
         expect(htmlElement).toHaveStyle(activeItemStyle)
     );
  </code></pre>
  <p>Why? And yes, I did say that my test function is <code>async</code>.</p>
  <p>Also trying to await in the first reference fails:
  <code>const allTodosElement = await findByText('All Todos');</code></p>