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

Test of the recompute function in an Ember helper always fails #254

Closed
jonnedeprez opened this issue Mar 17, 2017 · 1 comment
Closed

Test of the recompute function in an Ember helper always fails #254

jonnedeprez opened this issue Mar 17, 2017 · 1 comment

Comments

@jonnedeprez
Copy link

I'm having trouble writing an integration test for an Ember helper that is subscribed to an Evented service. When the service triggers such an event, the helper calls the recompute function.
It works really well in the real app, but the test always evaluates the output of the helper in the template before the recompute function is called. Calling wait() first doesn't make a difference.

This Twiddle demonstrates the issue.

@jonnedeprez
Copy link
Author

Solved it myself. I didn't realize at first I had to wrap the event trigger in the test in a runloop.

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

No branches or pull requests

1 participant