1
votes

I have a model (DS.Model) with a few computed properties and it has a custom adapter that extends DS.Adapter. Nothing asynchronous that I know of is going on here, but in my qUnit test I get the error pasted below. It is fixed if I wrap my assertion in an Ember.run() block. Does anyone know why?

Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in a run at new Error (native)

1
Could you add your test and model code? - Kuba NiechciaƂ
Good question, I had exactly the same one myself. Someone more knowledgeable should provide a definitive answer, but I think it has to do with the fact the Ember run loop (specifically, the "sync") phase has to run in order to update cached property value information. - user663031

1 Answers

0
votes

Inspect your ember application with the inspector browser plugin, and look in the promises tab.

You'll see there are a large number of promises there, even for an app with minimal code.

This isn't much of an answer, but looking at the promises tab should show that ember handles asyncrony without us necessarily knowing about it.