()
| 34 | } |
| 35 | |
| 36 | async function testFromAsyncSAB() { |
| 37 | const sab = new SharedArrayBuffer(4); |
| 38 | new Uint8Array(sab).set([10, 20, 30, 40]); |
| 39 | const batches = []; |
| 40 | for await (const batch of from(sab)) { |
| 41 | batches.push(batch); |
| 42 | } |
| 43 | assert.strictEqual(batches.length, 1); |
| 44 | assert.deepStrictEqual(batches[0][0], new Uint8Array([10, 20, 30, 40])); |
| 45 | } |
| 46 | |
| 47 | // ============================================================================= |
| 48 | // Consumers with SAB-backed source |
no test coverage detected
searching dependent graphs…