MCPcopy Create free account
hub / github.com/TanStack/query / waitForMissingQueryClient

Function waitForMissingQueryClient

packages/lit-query/src/tests/testHost.ts:105–117  ·  view source on GitHub ↗
(
  read: () => unknown,
  timeoutMs = 2000,
)

Source from the content-addressed store, hash-verified

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

Calls 2

waitForFunction · 0.70

Tested by

no test coverage detected