()
| 98 | // Create a slow async source that blocks between yields |
| 99 | let sourceFinished = false; |
| 100 | async function* slowSource() { |
| 101 | const enc = new TextEncoder(); |
| 102 | yield [enc.encode('chunk1')]; |
| 103 | // Simulate a long delay - the cancel should unblock this |
| 104 | await new Promise((resolve) => setTimeout(resolve, 10000)); |
| 105 | yield [enc.encode('chunk2')]; |
| 106 | sourceFinished = true; |
| 107 | } |
| 108 | |
| 109 | const { broadcast: bc } = Broadcast.from(slowSource()); |
| 110 | const consumer = bc.push(); |
no test coverage detected
searching dependent graphs…