()
| 110 | } |
| 111 | |
| 112 | async function testPipeToAsyncSAB() { |
| 113 | const sab = new SharedArrayBuffer(3); |
| 114 | new Uint8Array(sab).set([65, 66, 67]); // 'ABC' |
| 115 | const written = []; |
| 116 | const writer = { |
| 117 | async write(chunk) { written.push(chunk); }, |
| 118 | async end() { return written.length; }, |
| 119 | }; |
| 120 | await pipeTo(from(sab), writer); |
| 121 | assert.deepStrictEqual(written[0], new Uint8Array([65, 66, 67])); |
| 122 | } |
| 123 | |
| 124 | // ============================================================================= |
| 125 | // pull / pullSync with SAB-yielding generator |
no test coverage detected
searching dependent graphs…