(form: FormData, { tableId }: { tableId: string } = { tableId: 'tbl_1' })
| 149 | } |
| 150 | |
| 151 | async function callPost(form: FormData, { tableId }: { tableId: string } = { tableId: 'tbl_1' }) { |
| 152 | // Building the request from a FormData body gives a real multipart stream and |
| 153 | // boundary, exercising the streaming `readMultipart` parser end-to-end. |
| 154 | const req = new NextRequest(`http://localhost:3000/api/table/${tableId}/import`, { |
| 155 | method: 'POST', |
| 156 | body: form, |
| 157 | }) |
| 158 | return POST(req, { params: Promise.resolve({ tableId }) }) |
| 159 | } |
| 160 | |
| 161 | describe('POST /api/table/[tableId]/import', () => { |
| 162 | beforeEach(() => { |
no test coverage detected