MCPcopy
hub / github.com/apify/crawlee / getRequestListForMock

Function getRequestListForMock

test/core/crawlers/cheerio_crawler.test.ts:41–52  ·  view source on GitHub ↗
(mockData: Dictionary, pathName = 'special/mock')

Source from the content-addressed store, hash-verified

39let serverAddress = 'http://localhost:';
40
41async function getRequestListForMock(mockData: Dictionary, pathName = 'special/mock') {
42 const sources: Source[] = [1, 2, 3, 4].map((num) => {
43 return {
44 url: `${serverAddress}/${pathName}?a=${num}`,
45 payload: JSON.stringify(mockData),
46 method: 'POST',
47 headers: { 'Content-Type': 'application/json' },
48 };
49 });
50 const requestList = await RequestList.open(null, sources);
51 return requestList;
52}
53
54async function getRequestListForMirror() {
55 const sources = [

Callers 1

Calls 2

mapMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…