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

Function fetchNumber

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

Source from the content-addressed store, hash-verified

6154 const spy = vi.fn()
6155
6156 async function fetchNumber(id: number) {
6157 await sleep(5)
6158 return { numbers: { current: { id } } }
6159 }
6160
6161 function Test() {
6162 const [id, setId] = React.useState(1)

Callers 1

TestFunction · 0.70

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected