(body)
| 7 | const { Client } = require('..') |
| 8 | |
| 9 | function readBody (body) { |
| 10 | return new Promise((resolve, reject) => { |
| 11 | let data = '' |
| 12 | body.setEncoding('latin1') |
| 13 | body.on('data', chunk => { data += chunk }) |
| 14 | body.on('end', () => resolve(data)) |
| 15 | body.on('error', reject) |
| 16 | }) |
| 17 | } |
| 18 | |
| 19 | test('should not reuse an idle socket with buffered unsolicited response bytes', async () => { |
| 20 | let evilServerSocket |
no test coverage detected
searching dependent graphs…