Yes, you should definitely set Ember.testing = true in your tests.
Without Ember.testing , runloops are automatically assigned using setTimeout , where the instability you noticed comes from.
Note. At the moment, when you activate Ember.testing , you must prefix many lines in your test code with Em.run => , for example
Em.run => obj.set('someProperty', true)
If you forget, he will complain loudly, otherwise the state of the properties / applications will not be updated when trying to execute statements against him.
This may be improved someday, but for now, donβt worry about your test code being sprinkled with run calls.
Jo liss
source share