-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Replace "klassy" with ES6 classes #183
Conversation
Will take some time to do a more thorough review, but I definitely approve the effort (and from prior conversations with @dgeb I believe he does as well). |
💚 ... thanks Travis :) |
Yeah, Klassy is a lib I will gladly retire. Thanks @Turbo87. |
setupContext() { | ||
this._super({ application: this.createApplication() }); | ||
}, | ||
super({ application: this.createApplication() }); |
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.
This should be super.setupContext
(bare super
is only valid in constructor
).
|
||
teardownContext() { | ||
Ember.run(() => { | ||
getContext().application.destroy(); | ||
}); | ||
|
||
this._super(); | ||
}, | ||
super(); |
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.
Should be super.teardownContext
setupContext: function() { | ||
this._super.call(this); | ||
setupContext() { | ||
super(); |
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.
bare super
is only valid in constructor
@@ -93,7 +95,7 @@ export default AbstractTestModule.extend({ | |||
return container.lookupFactory(subjectName); | |||
}; | |||
|
|||
this._super({ | |||
super({ |
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.
bare super
is only valid in constructor
var subjectName = this.subjectName; | ||
var container = this.container; | ||
|
||
var factory = function() { | ||
return container.lookupFactory(subjectName); | ||
}; | ||
|
||
this._super({ | ||
super({ |
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.
bare super
is only valid in constructor
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.
ouch, forgot about that... thanks!
@rwjblue done! |
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.
We will need to update ember-cli-qunit
/ ember-qunit
and ember-cli-mocha
/ ember-mocha
to prevent them from erroring (which I think makes this a major version bump, but that seems fine to me).
i.e.:
- https://github.com/emberjs/ember-qunit/blob/master/Brocfile.js#L37-L42
- https://github.com/ember-cli/ember-cli-qunit/blob/master/index.js#L17
In the long run, I suspect that we should probably rethink our publishing to make it easier to avoid this sort of silly coupling but that seems fine for a future refactor to me...
@rwjblue I do agree that those need updates to remove |
also I tend to say that |
When this PR lands the |
I agree in general.
Disagree, for the reason mentioned above. I believe that existing versions of ember-qunit / ember-cli-qunit will error after a |
I just tried it on a fresh app with |
I don't this npm link is good enough. You would need to ensure there is no version of |
you're right, I'm stupid... I see how this would break now. Since |
Ya. I was thinking 0.6.0 (I sometimes incorrectly refer to this as a "major" bump when sub 1.0, but what I'm really meaning is that we need to not match for users with |
🎉 will adjust the other libs to account for this change later today unless someone else beats me to it 😉 |
/cc @trentmwillis @rwjblue @dgeb @stefanpenner