()
| 45 | |
| 46 | // Async share — Symbol.dispose cancels |
| 47 | async function testShareDispose() { |
| 48 | const shared = share(from('dispose-test')); |
| 49 | const consumer = shared.pull(); |
| 50 | shared[Symbol.dispose](); |
| 51 | assert.strictEqual(shared.consumerCount, 0); |
| 52 | // Consumer should yield nothing (cancelled before read) |
| 53 | const result = await text(consumer); |
| 54 | assert.strictEqual(result, ''); |
| 55 | } |
| 56 | |
| 57 | // Sync share — Symbol.dispose cancels |
| 58 | async function testSyncShareDispose() { |
no test coverage detected
searching dependent graphs…