title: Timeout - Async callback was not invoked within the 5000ms
body: <p>I created this hook:</p>
  <pre><code>import { useQuery, gql } from '@apollo/client';
  
  export const GET_DECIDER = gql`
    query GetDecider($name: [String]!) {
      deciders(names: $name) {
        decision
        name
        value
      }
    }
  `;
  
  export const useDecider = (name) =&gt; {
    const { loading, data } = useQuery(GET_DECIDER, { variables: { name } });
    console.log('loading:', loading);
    console.log('data:', data);
    return { enabled: data?.deciders[0]?.decision, loading };
  };
  </code></pre>
  <p>Im trying to test it with react testing library:</p>
  <pre><code>const getMock = (decision) =&gt; [
    {
      request: {
        query: GET_DECIDER,
        variables: { name: 'FAKE_DECIDER' },
      },
      result: {
        data: {
          deciders: [{ decision }],
        },
      },
    },
  ];
  
  const FakeComponent = () =&gt; {
    const { enabled, loading } = useDecider('FAKE_DECIDER');
  
    if (loading) return &lt;div&gt;loading&lt;/div&gt;;
  
    console.log('DEBUG-enabled:', enabled);
  
    return &lt;div&gt;{enabled ? 'isEnabled' : 'isDisabled'}&lt;/div&gt;;
  };
  
  
  // Test 
  import React from 'react';
  import { render, screen, cleanup, act } from '@testing-library/react';
  import '@testing-library/jest-dom';
  import { MockedProvider } from '@apollo/client/testing';
  import { useDecider, GET_DECIDER } from './useDecider';
  
  
  describe('useDecider', () =&gt; {
    afterEach(() =&gt; {
      cleanup();
    });
  
    it('when no decider provided - should return false', async () =&gt; {
      render(&lt;MockedProvider mocks={getMock(false)}&gt;
               &lt;FakeComponent /&gt;
             &lt;/MockedProvider&gt;
            );
      expect(screen.getByText('loading')).toBeTruthy();
  
      act((ms) =&gt; new Promise((done) =&gt; setTimeout(done, ms)))
  
      const result = screen.findByText('isDisabled');
      expect(result).toBeInTheDocument();
    });
  });
  
  </code></pre>
  <p>I keep getting this error:</p>
  <blockquote>
  <p>Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error:</p>
  </blockquote>