()
| 9 | } |
| 10 | |
| 11 | function createTestSocket(): TestSocket { |
| 12 | const emitter = new EventEmitter() as TestSocket |
| 13 | emitter.destroyed = false |
| 14 | emitter.destroy = ((_error?: Error) => { |
| 15 | emitter.destroyed = true |
| 16 | emitter.emit('close') |
| 17 | return emitter |
| 18 | }) as TestSocket['destroy'] |
| 19 | emitter.emitData = (chunk: Buffer) => { |
| 20 | emitter.emit('data', chunk) |
| 21 | } |
| 22 | return emitter |
| 23 | } |
| 24 | |
| 25 | describe('attachNdjsonFramer', () => { |
| 26 | test('accepts a complete frame at the configured byte limit', () => { |
no test coverage detected