Why force the runloop?
Closed this issue · 4 comments
bcardarella commented
I'm wondering why https://github.com/ride/ember-stripe-service/blob/master/app/services/stripe.js#L12 exists
buritica commented
Because I couldn't get the normal run loop to work, promise would resolve before getting the Stripe token. Hit myself against many, many walls and this made it work. More info can be found #10
bcardarella commented
@rwjblue can you confirm/deny if this is a thing and any advice on how I can go about patching?
buritica commented
hey @bcardarella, you can now see in #27 what happens when the low-level Ember.run.begin()
is removed.
- unit tests with stubbed Stripe pass
- integration tests fail
so, "this is a thing", and I'm not pretty sure how to solve it or why it happens, but any suggestions are welcome because I think this is also messing up other people's tests
buritica commented
This now works, thanks for the feedback!