(headers)
| 35 | srv.actualPort = port; |
| 36 | |
| 37 | const get = (headers) => new Promise((resolve, reject) => { |
| 38 | const req = http.request({ host: '127.0.0.1', port, path: '/v1/models', method: 'GET', |
| 39 | headers: { authorization: 'Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ...headers } }, (res) => { |
| 40 | const chunks = []; |
| 41 | res.on('data', (d) => chunks.push(d)); |
| 42 | res.on('end', () => resolve({ status: res.statusCode, bytes: Buffer.concat(chunks) })); |
| 43 | }); |
| 44 | req.on('error', reject); |
| 45 | req.end(); |
| 46 | }); |
| 47 | |
| 48 | try { |
| 49 | await run({ get }); |
no outgoing calls
no test coverage detected