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
The following screenshot shows the _find function which seems to load the child record. As you can see this happens before the test's assertion:
The other breakpoint is within the then callback, and this happens after the assertion, and apparently after the test has been teared down, as the call to serializerForAdapter is causing the afore mentioned exception (the jsonapi serializer has already been destroyed, when it tries to set the store on it):
Also, when downgrading to 0.14.4 this error does not show up. As you said already, the root issue might be caused by the larger upstream changes in ember-test-helpers, but I filed this here for now...
The text was updated successfully, but these errors were encountered:
@Turbo87 this is the regression I mentioned yesterday on Slack. I finally got a minimal reproduction together: https://github.com/simonihmig/ember-mocha-demo
The failing test is this one: https://github.com/simonihmig/ember-mocha-demo/blob/master/tests/integration/components/my-component-test.js#L39-L42.
In the
beforeEach
I load a modelparent
, that has an async relationship tochild
. The loading of thechild
happens in the template: https://github.com/simonihmig/ember-mocha-demo/blob/master/app/templates/components/my-component.hbs#L4.The test itself is passing, but some async callback of ember-data seems to run after the test has finished, causing a
set on destroyed object
error:The following screenshot shows the
_find
function which seems to load thechild
record. As you can see this happens before the test's assertion:The other breakpoint is within the
then
callback, and this happens after the assertion, and apparently after the test has been teared down, as the call toserializerForAdapter
is causing the afore mentioned exception (the jsonapi serializer has already been destroyed, when it tries to set thestore
on it):Adding
await wait()
fixes this: https://github.com/simonihmig/ember-mocha-demo/blob/master/tests/integration/components/my-component-test.js#L39-L42. So seems there is still some pending promise or run loop that is not correctly waited for before tearing down the test?Also, when downgrading to
0.14.4
this error does not show up. As you said already, the root issue might be caused by the larger upstream changes inember-test-helpers
, but I filed this here for now...The text was updated successfully, but these errors were encountered: