-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use toEmit with async code #86
Comments
const seq = Kefir.sequentially(100, [1, 2]).toProperty(() => 0)
expect(seq).toEmitInTime([
[0, value(0, { current: true })],
[100, value(1)],
[200, value(2)],
[200, end()],
], tick => {
tick(200);
}); |
Yes, I am aware of that. In theory that is sufficient, in practice it might not work when testing code that also relies on promises so I still think this suggestion would make a lot of sense for real-world testing cases. |
Ok, will reopen to investigate, but not sure when I'll get to it. Open to a PR though if you're interested! |
Two things:
|
It would be great if
toEmit
(i.e.createTestHelpers(Kefir).watch
) would allow asserting that an observable emits, also asynchronously. For example:The text was updated successfully, but these errors were encountered: