| 1 | import { Readable, Writable } from 'node:stream'; |
| 2 | |
| 3 | export class MockWritable extends Writable { |
| 4 | public buffer: string[] = []; |
| 5 | public isTTY = false; |
| 6 | public columns = 80; |
| 7 | public rows = 20; |
| 8 | |
| 9 | _write( |
| 10 | chunk: any, |
| 11 | _encoding: BufferEncoding, |
| 12 | callback: (error?: Error | null | undefined) => void |
| 13 | ): void { |
| 14 | this.buffer.push(chunk.toString()); |
| 15 | callback(); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | export class MockReadable extends Readable { |
| 20 | protected _buffer: unknown[] | null = []; |
nothing calls this directly
no outgoing calls
no test coverage detected