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

Function recordingService

apps/cloud/src/edge/marketing.test.ts:271–280  ·  view source on GitHub ↗
(respond: (request: Request) => Promise<Response> | Response)

Source from the content-addressed store, hash-verified

269
270 /** A v2 service that records what it receives and answers with `respond`. */
271 const recordingService = (respond: (request: Request) => Promise<Response> | Response) => {
272 const received: Request[] = [];
273 const service: V2Service = {
274 fetch: async (request) => {
275 received.push(request);
276 return respond(request);
277 },
278 };
279 return { received, service };
280 };
281
282 it("redirects sign-up to v2's configured sign-up page, ignoring the query", async () => {
283 const { received, service } = recordingService(() => new Response(null));

Callers 1

marketing.test.tsFile · 0.85

Calls 2

pushMethod · 0.80
respondFunction · 0.50

Tested by

no test coverage detected