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

Function fetchNumber

packages/react-query/src/__tests__/useQuery.test.tsx:6192–6195  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

6190 const spy = vi.fn<(data: unknown) => void>()
6191
6192 async function fetchNumber(id: number) {
6193 await sleep(5)
6194 return { numbers: { current: { id } } }
6195 }
6196
6197 function Test() {
6198 const [id, setId] = React.useState(1)

Callers 1

TestFunction · 0.70

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected