()
| 126 | // ============================================================================= |
| 127 | |
| 128 | function testPullSyncSABChunks() { |
| 129 | function* gen() { |
| 130 | const sab = new SharedArrayBuffer(2); |
| 131 | new Uint8Array(sab).set([1, 2]); |
| 132 | yield [new Uint8Array(sab)]; |
| 133 | } |
| 134 | const batches = []; |
| 135 | for (const batch of pullSync(gen())) { |
| 136 | batches.push(batch); |
| 137 | } |
| 138 | assert.strictEqual(batches.length, 1); |
| 139 | assert.deepStrictEqual(batches[0][0], new Uint8Array([1, 2])); |
| 140 | } |
| 141 | |
| 142 | async function testPullAsyncSABChunks() { |
| 143 | async function* gen() { |
no test coverage detected
searching dependent graphs…