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

Function waitForMissingQueryClient

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

Source from the content-addressed store, hash-verified

104}
105
106export 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}

Calls 2

waitForFunction · 0.70

Tested by

no test coverage detected