(overrides: Partial<FastifyRequest> = {})
| 29 | } |
| 30 | |
| 31 | function 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 | |
| 40 | beforeEach(() => { |
| 41 | isBot.mockReset(); |