()
| 57 | } |
| 58 | |
| 59 | export async function classicByteTransform () { |
| 60 | const stream = transform(function (chunk, _enc, cb) { |
| 61 | if (!this._i) this._i = 97 |
| 62 | else this._i++ |
| 63 | const out = new Uint8Array(chunk.length) |
| 64 | out.fill(this._i) |
| 65 | this.push(out) |
| 66 | cb() |
| 67 | }) |
| 68 | const done = collect(stream) |
| 69 | stream.write(randomBytes(10)) |
| 70 | stream.write(randomBytes(5)) |
| 71 | stream.write(randomBytes(10)) |
| 72 | stream.end() |
| 73 | eq(decoder.decode(await done), 'aaaaaaaaaabbbbbcccccccccc') |
| 74 | } |
| 75 | |
| 76 | export async function classicNoopTransform () { |
| 77 | const stream = transform() |
nothing calls this directly
no test coverage detected