( read: () => unknown, timeoutMs = 2000, )
| 104 | } |
| 105 | |
| 106 | export async function waitForMissingQueryClient( |
| 107 | read: () => unknown, |
| 108 | timeoutMs = 2000, |
| 109 | ): Promise<void> { |
| 110 | await waitFor(() => { |
| 111 | try { |
| 112 | read() |
| 113 | return false |
| 114 | } catch (error) { |
| 115 | return isMissingQueryClientError(error) |
| 116 | } |
| 117 | }, timeoutMs) |
| 118 | } |
no test coverage detected