mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-19 08:00:23 +00:00
fix for stupid IE handling of named functions in mocks
This commit is contained in:
parent
3f0a37f380
commit
8682befc72
2 changed files with 9 additions and 9 deletions
8
src/angular-mocks.js
vendored
8
src/angular-mocks.js
vendored
|
|
@ -238,10 +238,10 @@ angular.service('$exceptionHandler', function(e) {
|
|||
*/
|
||||
angular.service('$log', function() {
|
||||
var $log = {
|
||||
log: function log(){ log.logs.push(arguments) },
|
||||
warn: function warn(){ warn.logs.push(arguments) },
|
||||
info: function info(){ info.logs.push(arguments) },
|
||||
error: function error(){ error.logs.push(arguments) }
|
||||
log: function(){ $log.logs.push(arguments) },
|
||||
warn: function(){ $log.logs.push(arguments) },
|
||||
info: function(){ $log.logs.push(arguments) },
|
||||
error: function(){ $log.logs.push(arguments) }
|
||||
};
|
||||
|
||||
$log.log.logs = [];
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
* See {@link angular.mock} for more info on angular mocks.
|
||||
*/
|
||||
var $logMock = {
|
||||
log: function log(){ log.logs.push(arguments) },
|
||||
warn: function warn(){ warn.logs.push(arguments) },
|
||||
info: function info(){ info.logs.push(arguments) },
|
||||
error: function error(){ error.logs.push(arguments) }
|
||||
log: function(){ $logMock.log.logs.push(arguments) },
|
||||
warn: function(){ $logMock.warn.logs.push(arguments) },
|
||||
info: function(){ $logMock.info.logs.push(arguments) },
|
||||
error: function(){ $logMock.error.logs.push(arguments) }
|
||||
};
|
||||
$logMock.log.logs = [];
|
||||
$logMock.warn.logs = [];
|
||||
|
|
@ -58,7 +58,7 @@ angular.service('$log', function() {
|
|||
*
|
||||
*/
|
||||
function $exceptionHandlerMockFactory() {
|
||||
function mockHandler(e) {
|
||||
var mockHandler = function(e) {
|
||||
mockHandler.errors.push(e);
|
||||
}
|
||||
mockHandler.errors = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue