({ reqPath, body })
| 52 | srv.actualPort = port; |
| 53 | |
| 54 | const call = ({ reqPath, body }) => new Promise((resolve, reject) => { |
| 55 | const req = http.request({ host: '127.0.0.1', port, path: reqPath, method: 'POST', |
| 56 | headers: { 'content-type': 'application/json', authorization: 'Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'user-agent': 'google-genai-sdk/1.0' } }, (res) => { |
| 57 | const chunks = []; |
| 58 | res.on('data', (d) => chunks.push(d)); |
| 59 | res.on('end', () => resolve({ status: res.statusCode, bytes: Buffer.concat(chunks) })); |
| 60 | }); |
| 61 | req.on('error', reject); |
| 62 | req.end(JSON.stringify(body)); |
| 63 | }); |
| 64 | |
| 65 | const readRows = async (expected = 1) => { |
| 66 | let lines = []; |
no outgoing calls
no test coverage detected