-
-
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
Observables #1898
Comments
Side note: Gulp is doing the same thing with Observables in 4.0. |
One temporary solution for RxJS Next/5 is to use |
Is this something Mocha would accept a PR on? |
Handles returned observables the same way we handle returned promises. Use the shared `symbol-observable` library for interop and consume the stream until it ends. If an error is emitted, call callback with error object from stream. Fixes mochajs#1898.
I'm not yet familiar with how observables are implemented under the hood, so I want to check one thing: would this interfere with making generator test functions be failures, if the latter were implemented by checking for Obviously, handling generators (even as automatic failures*) and handling observables can be two separate enhancements; I just want to make sure that by deciding to add either one we aren't closing off the ability to decide for or against the other. *(In case the rationale makes this any clearer, I've come part way around on my thinking in this regard since it was last discussed: I'm still not so sure we would want Mocha to assume that the promise-unwrapping generator wrapper behavior is the one that should be default-associated with tests, but I see enough usefulness in such wrappings -- for Selenium especially -- that I think passing the test if somebody forgets the wrapper is unhelpful, and I think checking for the |
@ScottFreeCode For the PR I opened (#2722) I used |
Handles returned observables the same way we handle returned promises. Use the shared `symbol-observable` library for interop and consume the stream until it ends. If an error is emitted, call callback with error object from stream. Fixes mochajs#1898.
I am a bot that watches issues for inactivity. |
So there's this cool thing called
Observable
s that is (likely) coming to the language soon (ref 1, ref 2).They are similar to promises in a number of ways.
Since Mocha supports returning promises in order to avoid using the
done
callback, it'd be nice if it did the same thing with observables:People are already using these with http://reactivex.io/.
cc @Blesh
The text was updated successfully, but these errors were encountered: