(method: string, body: Record<string, unknown>)
| 20 | import { GET, POST } from '@/app/api/copilot/feedback/route' |
| 21 | |
| 22 | function createMockRequest(method: string, body: Record<string, unknown>): NextRequest { |
| 23 | return new NextRequest('http://localhost:3000/api/copilot/feedback', { |
| 24 | method, |
| 25 | body: JSON.stringify(body), |
| 26 | headers: { 'Content-Type': 'application/json' }, |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | describe('Copilot Feedback API Route', () => { |
| 31 | beforeEach(() => { |