(req: any)
| 22 | // Mock auth middleware to bypass authentication |
| 23 | vi.mock('../../src/middleware/auth.js', () => { |
| 24 | const setTestUser = (req: any) => { |
| 25 | req.user = { |
| 26 | id: 'user_test_assets', |
| 27 | email: 'test-assets@example.com', |
| 28 | is_admin: true, |
| 29 | firstName: 'Test', |
| 30 | }; |
| 31 | }; |
| 32 | const passthrough = (_req: any, _res: any, next: any) => next(); |
| 33 | return { |
| 34 | requireAuth: (req: any, _res: any, next: any) => { setTestUser(req); next(); }, |
no outgoing calls
no test coverage detected