MCPcopy Index your code
hub / github.com/simstudioai/sim / callPost

Function callPost

apps/sim/app/api/table/[tableId]/import/route.test.ts:151–159  ·  view source on GitHub ↗
(form: FormData, { tableId }: { tableId: string } = { tableId: 'tbl_1' })

Source from the content-addressed store, hash-verified

149}
150
151async 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
161describe('POST /api/table/[tableId]/import', () => {
162 beforeEach(() => {

Callers 1

route.test.tsFile · 0.70

Calls 2

POSTFunction · 0.90
resolveMethod · 0.65

Tested by

no test coverage detected