-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(takeLast): fix takeLast behavior to emit correct order #1412
Conversation
|
Nice! Thanks for the fix |
expect(expected.length).toBe(0); | ||
done(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the above tests to use marble diagrams and virtual scheduling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, let me do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind keeping one synchronous test, of course, but the marble tests are more analogous to the issue that was reported (which was using an interval).
Updated PR to use marble diagram for test cases. |
it('should take last three values', () => { | ||
const e1 = cold('--a-----b----c---d--| '); | ||
const e1subs = '^ ! '; | ||
const expected = '--------------------(bcd|)'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer
Merged with 73eb658. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
closes #1407
This PR tries to fix behavior of
takeLast
by changing ring buffer indexing routines. Maybe I miss something, but so far it looks work correctly./cc @staltz for visibility.