MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / recordingWorker

Function recordingWorker

apps/cloud/src/edge/front.test.ts:6–17  ·  view source on GitHub ↗
(respond: () => Response)

Source from the content-addressed store, hash-verified

4
5/** A Worker stand-in that records what it receives and answers with `respond`. */
6const recordingWorker = (respond: () => Response) => {
7 const received: Request[] = [];
8 return {
9 received,
10 worker: {
11 fetch: (request: Request) => {
12 received.push(request);
13 return Promise.resolve(respond());
14 },
15 },
16 };
17};
18
19const settings = (v2: FrontEnv["V2"], marketing?: FrontEnv["MARKETING"]): FrontEnv => ({
20 V2: v2,

Callers 1

front.test.tsFile · 0.85

Calls 3

pushMethod · 0.80
resolveMethod · 0.80
respondFunction · 0.50

Tested by

no test coverage detected