()
| 140 | } |
| 141 | |
| 142 | async function testPullAsyncSABChunks() { |
| 143 | async function* gen() { |
| 144 | const sab = new SharedArrayBuffer(2); |
| 145 | new Uint8Array(sab).set([3, 4]); |
| 146 | yield [new Uint8Array(sab)]; |
| 147 | } |
| 148 | const batches = []; |
| 149 | for await (const batch of pull(gen())) { |
| 150 | batches.push(batch); |
| 151 | } |
| 152 | assert.strictEqual(batches.length, 1); |
| 153 | assert.deepStrictEqual(batches[0][0], new Uint8Array([3, 4])); |
| 154 | } |
| 155 | |
| 156 | // ============================================================================= |
| 157 | // Transform returning SAB |
no test coverage detected
searching dependent graphs…