Just (finally) got rid of all my phantomjs errors when running ./rtd --debug
One thing that had me stuck for quite some time was the RouteController stub in iron-router-stubs.js. The issue happens when using .extend() on a controller from RouteController.extend();
Results in an undefined function issue for ArticleListController.
The way I got it working was to override the provided stub with:
var RouteControllerClass = function(route){
//apply properties of route to controller so you can test against them later
for(var i in route){
this[i] = route[i];
}
};
RouteControllerClass.prototype = {
extend: function(route) {
return new RouteControllerClass(route);
}
};
var RouteController = new RouteControllerClass();
There's probably a much tidier way of doing this but it caused me quite a headache so I thought I'd open the issue with a workaround for anyone stuck on the same thing.
Just (finally) got rid of all my phantomjs errors when running ./rtd --debug
One thing that had me stuck for quite some time was the RouteController stub in iron-router-stubs.js. The issue happens when using .extend() on a controller from RouteController.extend();
In my case:
Results in an undefined function issue for ArticleListController.
The way I got it working was to override the provided stub with:
There's probably a much tidier way of doing this but it caused me quite a headache so I thought I'd open the issue with a workaround for anyone stuck on the same thing.