MCPcopy
hub / github.com/alibaba/hooks / mockRequest

Function mockRequest

packages/hooks/src/useInfiniteScroll/__tests__/index.spec.ts:9–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8let count = 0;
9export async function mockRequest() {
10 await sleep(1000);
11 if (count >= 1) {
12 return { list: [4, 5, 6] };
13 }
14 count++;
15 return {
16 list: [1, 2, 3],
17 nextId: count,
18 };
19}
20
21const targetEl = document.createElement('div');
22

Callers

nothing calls this directly

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…