After @cavneb’s talk at EmberConf, I decided to ditch our old testing framework (Dominator and other yucky crap) and port over to Ember.Testing. It went very smoothly, but I’m left with one question, and that is who to handle continuous timers.
Back story: We have one controller that uses a 30 second timer by calling
Ember.run.later. This timer is used to compute the state of data that is time sensitive and cannot otherwise be observed.
The problem this causes is that
wait used by
Ember.Testing waits until all timers have been executed before moving on. Which will never happen in most of my routes due to this polling timer. So this is an open question on what the best approach is here. I’m open to anything, just interested to know if there is a right way or wrong way to handle this problem.
My question is very similar to: Testing and scheduled timers in run loop which went unanswered, but I felt my scenario was different enough to ask separately.