Skip to content
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

Adding promise support to runnables (and thus tests). #1036

Closed
wants to merge 1 commit into from

Conversation

truongsinh
Copy link

  • If a runnable returns a duck-typed promise, i.e. an object with a then method, it gets treated as an async test, with success if the promise is fulfilled and failure if it is rejected (with the rejection reason as the error).
  • Includes tests both of new functionality and some to show that introducing this doesn't break any old functionality.

* If a runnable returns a duck-typed promise, i.e. an object with a `then` method, it gets treated as an async test, with success if the promise is fulfilled and failure if it is rejected (with the rejection reason as the error).
* Includes tests both of new functionality and some to show that introducing this doesn't break any old functionality.
@jonathanong
Copy link
Contributor

how do you open a PR from someone else's branch?

@truongsinh
Copy link
Author

Do you mean my ability of doing so, or the motivation of doing so?

The ability is pretty much from Github ACL, I believe, as this is an open source community. My motivation is that I am extensively using promise pattern in my coding, even to break the req-res pattern in express into promise pattern. Had there not been this PR, I would do it myself. But, as we all say "do not reinvent the wheel", I did the search first. I also want to appreciate the original author of this PR,

@phadej
Copy link

phadej commented Jan 3, 2014

👍

@c089
Copy link
Contributor

c089 commented Feb 13, 2014

@truongsinh Discussion on this is in #329, please close this PR as to not confuse people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants