0
我的应用程序中的以下代码应该重定向到身份验证服务。我的所有测试都因为初始页面重新加载而失败。
angular('app', [])
.run(['$window', function($window) {
$window.location = 'auth url' + '&redirect=' + $window.location.href;
};
测试错误:Some of your tests did a full page reload!
如何将.RUN块内部嘲笑$ window.location的,这样我可以防止页面重载?