You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First time I open a ticket here, and also this issue is very confusing to me, so please bear with me while I try to make sense of it 🙏
I'm also not sure if this is purely because of ember-cli-mirage, or if this is an issue with qunit/ember-data. If that's the case, please point it out!
test('fail with async',asyncfunction(assert){awaitvisit('/sample');awaitclick('#fail-async');assert.ok(true);});
Here is the error that is thrown:
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
This comes from the model.set(...) statement, more specifically this._internalModel.send('didSetProperty', ...), in the recordDidChange function.
Hi guys 👋
First time I open a ticket here, and also this issue is very confusing to me, so please bear with me while I try to make sense of it 🙏
I'm also not sure if this is purely because of ember-cli-mirage, or if this is an issue with qunit/ember-data. If that's the case, please point it out!
I managed to create a basic Ember repo to reproduce the error I got:
https://github.com/manudwarf/ember-cli-mirage-async
Here are the relevant snippets:
I started from this code:
Which works, and then I rewrote it using new Javascript
async
goodness:But this fails in acceptance tests. However, if I use this code:
It all works fine.
Here is the acceptance test:
Here is the error that is thrown:
This comes from the
model.set(...)
statement, more specificallythis._internalModel.send('didSetProperty', ...)
, in therecordDidChange
function.Moreover, you'll notice the difference with
set('saving', ...)
. This test case fails if I remove the<span>
from the template:https://github.com/manudwarf/ember-cli-mirage-async/blob/master/app/templates/components/sample-form.hbs
The text was updated successfully, but these errors were encountered: