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
places the normal LinkManagerService in the container.cache and container.factoryManagerCache.
Then the following owner.unregister(…) apparently only removes the registration, but not the instance in the container.cache.
As we figured, we weren't able to use
setupLink()
from within engines. @buschtoens did a run-down of this (credits to him, I'm just writing it down):We are hit by this: emberjs/ember.js#11173 (comment)
ember-link/addon-test-support/setup-link.ts
Lines 9 to 16 in 2db4148
places the normal
LinkManagerService
in thecontainer.cache
andcontainer.factoryManagerCache
.Then the following
owner.unregister(…)
apparently only removes the registration, but not the instance in thecontainer.cache
.There fix was added to
ApplicationInstance
, but theowner
in our test is not a fully-fledgedApplicationInstance
: https://github.com/emberjs/ember.js/pull/12680/filesThis seems to be an upstream bug in
@ember/test-helpers
, here is the trace:We don’t have an
application
in render tests, but aresolver
, so we hit L57 inhttps://github.com/emberjs/ember-test-helpers/blob/a4f710420e8dfba1a4245981483d7cbb5dcc865e/addon-test-support/%40ember/test-helpers/build-owner.ts#L41-L60
Which then builds a registry and owner on its own terms.
https://github.com/emberjs/ember-test-helpers/blob/a4f710420e8dfba1a4245981483d7cbb5dcc865e/addon-test-support/@ember/test-helpers/-internal/build-registry.ts
This of course lacks the
unregister
patch:https://github.com/emberjs/ember.js/blob/0da7fedd3767668e7fb01b50757f1a636782fb54/packages/%40ember/engine/instance.ts#L162-L167
The text was updated successfully, but these errors were encountered: