()
| 32 | // ============================================================================= |
| 33 | |
| 34 | async function testByteModeThroughFrom() { |
| 35 | const readable = new Readable({ |
| 36 | read() { |
| 37 | this.push(Buffer.from('hello')); |
| 38 | this.push(Buffer.from(' world')); |
| 39 | this.push(null); |
| 40 | }, |
| 41 | }); |
| 42 | |
| 43 | const result = await text(from(readable)); |
| 44 | assert.strictEqual(result, 'hello world'); |
| 45 | } |
| 46 | |
| 47 | // ============================================================================= |
| 48 | // Byte-mode Readable: basic round-trip through pull() |
no test coverage detected