mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 04:11:26 +08:00
refactors asyncTestDiscourse to bind context as self
This commit is contained in:
@ -25,12 +25,10 @@ function controllerFor(controller, model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function asyncTestDiscourse(text, func) {
|
function asyncTestDiscourse(text, func) {
|
||||||
|
|
||||||
asyncTest(text, function () {
|
asyncTest(text, function () {
|
||||||
|
var self = this;
|
||||||
var qunitContext = this;
|
|
||||||
Ember.run(function () {
|
Ember.run(function () {
|
||||||
func.call(qunitContext);
|
func.call(self);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user