Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'isInteractive' of undefined #15489

Closed
kenips opened this issue Jul 11, 2017 · 1 comment
Closed

Cannot read property 'isInteractive' of undefined #15489

kenips opened this issue Jul 11, 2017 · 1 comment
Labels

Comments

@kenips
Copy link

kenips commented Jul 11, 2017

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 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.

@krisselden
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants