marble

How to test observables which emit grouped events with rxjs marbles?

六月ゝ 毕业季﹏ 提交于 2019-12-07 09:11:47
问题 According to rxjs marbles documentation the current behaviour for the sync groupings is the following: '(ab)-(cd)': on frame 0, emits a and b then on frame 50, emits c and d From the docs: While it can be unintuitive at first, after all the values have synchronously emitted time will progress a number of frames equal to the number of ASCII characters in the group, including the parentheses Ok, but how do I test an observable like this (using marbles or any other technique): const observable$

How to make an rxjs marble sync grouping only take up one frame

孤者浪人 提交于 2019-12-01 10:38:58
According to https://github.com/ReactiveX/rxjs/blob/master/doc/writing-marble-tests.md '--(abc)-|': on frame 20, emit a, b, and c, then on frame 80 complete So how do I represent "on frame 20, emit a, b, and c, then on frame 40 complete. Ie how can I stop the sync group itself taking up frames? cartant has answered this question in his comment. There's no way to do it - sync groups will always take up extra frames even though all members occur in the frame of the opening bracket. 来源: https://stackoverflow.com/questions/46839094/how-to-make-an-rxjs-marble-sync-grouping-only-take-up-one-frame