-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Fix registry resolver for isolated container @2.3+ #127
Conversation
This does seem like a good fix, but it seems bad that a change in Ember broke like this. I'll try to dig into the change in Ember and see who is at fault (Ember or ember-test-helpers). |
Ember deprecated |
Awesome, thank you for doing the research on that! |
Yeah, this is the case we decided not to allow and deprecate. Not that we want a deprecation to always happen here - we need a better solution. |
@@ -296,6 +296,9 @@ export default Klass.extend({ | |||
|
|||
if (this.registry) { | |||
this.registry.fallback.resolver = function() {}; | |||
if (hasEmberVersion(2,3)) { | |||
this.registry.fallback.resolver.resolve = function() {}; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be slightly better as:
if (hasEmberVersion(2,3)) {
this.registry.fallback.resolver = {
resolve: function() {};
};
} else {
this.registry.fallback.resolver = function() {};
}
Will consider whether this can be handled even more elegantly.
@dgeb - I was thinking that we might be able to restructure our usage here, to simply create the registry with the right resolver (instead of clobbering it after instantiation). I believe that would work properly for all versions (and we wouldn't need a conditional), it also makes ember-test-helpers follow the "right" pattern... |
Sounds like the right approach to me @rwjblue 👍 |
444fb79
to
4350ead
Compare
@rwjblue - I've updated the PR to alter the resolver's resolve method before the registry is created. Is this the way we should be doing it? If this looks good to you, I can squash my commits. |
It seems the npm install failed on Travis. How can I run it again? |
Fix registry resolver for isolated container @2.3+
Thank you! |
Released in ember-qunit@0.4.17 and ember-mocha@0.8.8. |
Fixes #126.