MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / makeReq

Function makeReq

apps/api/src/hooks/is-bot.hook.test.ts:31–38  ·  view source on GitHub ↗
(overrides: Partial<FastifyRequest> = {})

Source from the content-addressed store, hash-verified

29}
30
31function makeReq(overrides: Partial<FastifyRequest> = {}) {
32 return {
33 headers: { 'user-agent': 'Googlebot/2.1' },
34 client: { projectId: 'proj-1' },
35 body: { type: 'track', payload: { properties: { path: '/home' } } },
36 ...overrides,
37 } as unknown as FastifyRequest;
38}
39
40beforeEach(() => {
41 isBot.mockReset();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected