Testing
waitFor
Retries an assertion callback when it throws until success or timeout.
Formal Syntax & Structure
react syntaxreact
await waitFor(() => expect(load).toHaveBeenCalled())Working Example
Example Snippetreact
await waitFor(() => expect(load).toHaveBeenCalled())