()
| 66 | // ============================================================================= |
| 67 | |
| 68 | async function testByteModeBytes() { |
| 69 | const data = Buffer.from('binary data here'); |
| 70 | const readable = new Readable({ |
| 71 | read() { |
| 72 | this.push(data); |
| 73 | this.push(null); |
| 74 | }, |
| 75 | }); |
| 76 | |
| 77 | const result = await bytes(from(readable)); |
| 78 | assert.deepStrictEqual(result, new Uint8Array(data)); |
| 79 | } |
| 80 | |
| 81 | // ============================================================================= |
| 82 | // Byte-mode Readable: batching - multiple buffered chunks yield as one batch |
no test coverage detected