(stream)
| 69 | const stream = new TransformStream(); |
| 70 | |
| 71 | async function test(stream) { |
| 72 | const writer = stream.writable.getWriter(); |
| 73 | const reader = stream.readable.getReader(); |
| 74 | |
| 75 | const { 1: result } = await Promise.all([ |
| 76 | writer.write('hello'), |
| 77 | reader.read(), |
| 78 | ]); |
| 79 | |
| 80 | assert.strictEqual(result.value, 'hello'); |
| 81 | } |
| 82 | |
| 83 | test(stream).then(common.mustCall()); |
| 84 | } |