Open dyoder opened 9 years ago
The test currently passes, but if we queue the events, it fails. This code illustrates the problem:
click = increment: new EventEmitter decrement: new EventEmitter i = flow [ events "change", click.increment map -> 1 ] j = flow [ events "change", click.decrement map -> -1 ] k = flow [ combine i, j accumulate ((a, b) -> a + b), 0 ] # inc, dec click.increment.emit "change" assert (yield next k).value == 1 click.decrement.emit "change" assert (yield next k).value == 0 click.increment.emit "change" click.decrement.emit "change" click.increment.emit "change" assert (yield next k).value == 1 assert (yield next k).value == 2 assert (yield next k).value == 1
The test currently passes, but if we queue the events, it fails. This code illustrates the problem: