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
I'm running into some issues upgrading an app from 1.13 to 2.14. I have some tests that reopens certain modules to stub, such as this.application.__container__.lookup('route:project').reopen(...). So perhaps that's not allowed in 2.14, but the error that I hit is rather bizarre.
First I got hit with the error Attempting to inject an unknown injection: 'service:-document', which is exactly what ember-wormhole#77 describe. If I stub that with this.register('service:-document', window.document, { instantiate: false }) as suggested in the bug, I got a new error: Cannot read property 'isInteractive' of undefined. Tracing that shows it comes from this line, so somehow the environment isn't being recognized. I wonder what the fix should be? Or is lookup not intended to be used here? Many thanks.
The text was updated successfully, but these errors were encountered:
You aren't going to have a good time reopening and stubbing internal things, if you want to resolve routes, test with integration: true, this is still lighter weight than a full acceptance test but your app's resolver and default registrations are in place.
Hey guys,
I'm running into some issues upgrading an app from 1.13 to 2.14. I have some tests that reopens certain modules to stub, such as
this.application.__container__.lookup('route:project').reopen(...)
. So perhaps that's not allowed in 2.14, but the error that I hit is rather bizarre.First I got hit with the error
Attempting to inject an unknown injection: 'service:-document'
, which is exactly what ember-wormhole#77 describe. If I stub that withthis.register('service:-document', window.document, { instantiate: false })
as suggested in the bug, I got a new error:Cannot read property 'isInteractive' of undefined
. Tracing that shows it comes from this line, so somehow the environment isn't being recognized. I wonder what the fix should be? Or is lookup not intended to be used here? Many thanks.The text was updated successfully, but these errors were encountered: