()
| 20 | // Create a mock PipeableStream that emits our chunks |
| 21 | const mockStream = new Readable({ |
| 22 | read() { |
| 23 | if (this.chunkIndex === 0) { |
| 24 | this.push(chunk1); |
| 25 | this.chunkIndex++; |
| 26 | } else if (this.chunkIndex === 1) { |
| 27 | this.push(chunk2); |
| 28 | this.chunkIndex++; |
| 29 | } else { |
| 30 | this.push(null); // End the stream |
| 31 | } |
| 32 | }, |
| 33 | }); |
| 34 | mockStream.chunkIndex = 0; |
| 35 |