| 10 | import { errorHandleDataFunction } from '../../src/server/errors'; |
| 11 | |
| 12 | function createMockClient(httpBodies: string[] = []): Client { |
| 13 | return { |
| 14 | getDataCollectionOptions: () => ({ |
| 15 | userInfo: false, |
| 16 | cookies: true, |
| 17 | httpHeaders: { request: true, response: true }, |
| 18 | httpBodies, |
| 19 | queryParams: true, |
| 20 | genAI: { inputs: true, outputs: true }, |
| 21 | stackFrameVariables: true, |
| 22 | frameContextLines: 5, |
| 23 | }), |
| 24 | getOptions: () => ({ |
| 25 | captureActionFormDataKeys: { username: true }, |
| 26 | }), |
| 27 | } as unknown as Client; |
| 28 | } |
| 29 | |
| 30 | describe('errorHandleDataFunction', () => { |
| 31 | beforeEach(() => { |