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

feat(async): support returning promises #48

Closed
sjelin opened this issue Jun 10, 2016 · 4 comments
Closed

feat(async): support returning promises #48

sjelin opened this issue Jun 10, 2016 · 4 comments

Comments

@sjelin
Copy link
Contributor

sjelin commented Jun 10, 2016

Jasmine has opted not to support returning promises: jasmine/jasmine#681

One result of this is that users can't take advantage of async functions 😢

We should just support async functions ourselves. Our users want it (angular/protractor#1214) and it seems like the way of the future.

Thoughts @juliemr @cnishina @mgiambalvo ?

@heathkit
Copy link
Contributor

Well, I think it's lame that they don't want to support returning promises.
I agree we should find a way to support async functions. If there's a well
supported plugin (maybe jasmine-promises
https://www.npmjs.com/package/jasmine-promises?), then we should probably
just use that and make it our "official" solution for doing async tests.

On Fri, Jun 10, 2016 at 3:13 PM, Sammy Jelin notifications@github.com
wrote:

Jasmine has opted not to support returning promises: jasmine/jasmine#681
jasmine/jasmine#681

One result of this is that users can't take advantage of async functions
😢

We should just support async functions ourselves. Our users want it (
angular/protractor#1214
angular/protractor#1214) and it seems like
the way of the future.

Thoughts @juliemr https://github.com/juliemr @cnishina
https://github.com/cnishina @mgiambalvo https://github.com/mgiambalvo
?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#48, or mute the thread
https://github.com/notifications/unsubscribe/AAAlR9aqLxnXrDRgwKj2wakVWXoddkPzks5qKeGOgaJpZM4IzX47
.

@sjelin
Copy link
Contributor Author

sjelin commented Jun 13, 2016

The plugin is a bit weird because you have to include it as a spec. Also, we can use our existing infrastructure around async functions to implement this in ~10 lines - much smaller than including a whole new plugin. And I don't know if jasmine-promises's patches to it, beforeAll, etc., would conflict with out patches.

@mattburrell
Copy link

@sjelin async function support would be an awesome feature. Any idea of when it might become available?

@sjelin
Copy link
Contributor Author

sjelin commented Oct 27, 2016

This is already available, as of PR #49. I expected merging that PR to automatically close this issue but I guess not. If I recall correctly, I discovered upon further investigation that the functionality was there the whole time and nothing needed to be done.

@sjelin sjelin closed this as completed Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants