mercredi 25 février 2015

How to write an Ember Async Test Helper?

I had a longish sequence of async testing steps that I was going to need to repeat, so I figured it was a good time to collect those behaviors in an Ember Async Test Helper, but once I had put them in a test helper and was injecting it, the async steps seem like they weren't being waited for!


The testing guide has a lot of conflicting information on this. Some async helpers return a wait() call, others return nothing at all. Some wrap their contents in an Ember.run() call, some do not.


This is not helped by the example test helper JSbin, which are themselves in an error state.


Can anyone point me in the right direction? What am I supposed to provide the registerAsyncTestHelper function to get all of its async contents to be run and resolved on the next andThen?





Aucun commentaire:

Enregistrer un commentaire