title: What does act(() => promise.resolve()) do exactly in my test
body: <p>I have a few tests that have synchronous code since it uses fetch responses. When i don't have this line &quot;await act(() =&gt; Promise.resolve());&quot;, i get this error. But once i add this line in, this error disappears and my test runs how its suppose to. I know its not a false positive because i checked the snapshot it logs into my terminal. But I'm confused about this one line. How does it target the promises in my app or is it just another way of writing a force settimeout function.</p>
  <p>error</p>
  <pre><code>    console.error
        Warning: An update to authenticator inside a test was not wrapped in act(...).
        
        When testing, code that causes React state updates should be wrapped into act(...):
        
        act(() =&gt; {
          /* fire events that update state */
        });
        /* assert on the output */
  </code></pre>
  <p>test</p>
  <pre><code>    test('when click with no inputs will display a error message in the DOM', async () =&gt; {
          const { getByText } = render(&lt;CreateForm /&gt;, {wrapper: AuthProvider});
  
          await act(() =&gt; Promise.resolve());
  
          fireEvent.click(getByText('Create'));
  
          expect(getByText('Please fill in all fields')).toBeInTheDocument();
      });
  </code></pre>