-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When a node (A) occurs multiple times as a dependency of another node (B), B will fire many times for each firing of A, and some of the firings will have wrong value.
The following test case illustrates the problem:
it("handles diamond dependencies without glitches", () => {
const source = sinkBehavior(0);
const b = lift((a, b) => a + b, source, source);
const spy = subscribeSpy(b);
assert.deepEqual(at(b), 0);
source.push(1);
assert.deepEqual(at(b), 2);
assert.deepEqual(spy.args, [[0], [2]]);
});It fails with:
1) behavior
applicative
handles diamond dependencies without glitches:
AssertionError: expected [ [ 0 ], [ 1 ], [ 2 ] ] to deeply equal [ [ 0 ], [ 2 ] ]
The presence of value 1 indicates that the framework let the application observe inconsistent values for source (0 and 1 in this case).
Is this the expected behavior? If not, are there plans to fix it?
kfigiela, przembot, dktn and jkopanski
Metadata
Metadata
Assignees
Labels
No labels