Is increasing jest.setTimeout() a good practice?

I have a case where I am mocking an API Put request in the Jest file like this.

    ....
    ....
    const mockSocialPostUpdate = jest
      .spyOn(api, "put")
      .mockImplementation(() => Promise.resolve());
    
    await waitFor(() => {
      expect(mockSocialPostUpdate).toHaveBeenCalledWith(
        expect.objectContaining({ path: "/api/v1/social-posts/:id" }),
        { id: postContent.id },
        {
          id: postContent.id,
          text: updatedDelta
        }
      );
    });

I am not sure why but only in this test file I am getting

 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:

Now the only solution that works is by putting jest.setTimeout(30000); but I am not sure if it's the best practice. How can I investigate why am I getting a timeout error for this test. I am doing console.logs and the Put request is happening and I am reaching the await WaitFor() function