diff options
Diffstat (limited to 'src/angular-mocks.js')
| -rw-r--r-- | src/angular-mocks.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/angular-mocks.js b/src/angular-mocks.js index 731c2c29..86f1b46f 100644 --- a/src/angular-mocks.js +++ b/src/angular-mocks.js @@ -146,7 +146,7 @@ function MockBrowser() { if (!expectation) { throw new Error("Unexpected request for method '" + method + "' and url '" + url + "'."); } - requests.push(function(){ + requests.push(function() { angular.forEach(expectation.headers, function(value, key){ if (headers[key] !== value) { throw new Error("Missing HTTP request header: " + key + ": " + value); @@ -317,7 +317,7 @@ MockBrowser.prototype = { * @description * run all fns in pollFns */ - poll: function poll(){ + poll: function poll() { angular.forEach(this.pollFns, function(pollFn){ pollFn(); }); @@ -356,10 +356,10 @@ MockBrowser.prototype = { } }, - addJs: function(){} + addJs: function() {} }; -angular.service('$browser', function(){ +angular.service('$browser', function() { return new MockBrowser(); }); @@ -397,10 +397,10 @@ angular.service('$log', MockLogFactory); function MockLogFactory() { var $log = { - log: function(){ $log.log.logs.push(arguments); }, - warn: function(){ $log.warn.logs.push(arguments); }, - info: function(){ $log.info.logs.push(arguments); }, - error: function(){ $log.error.logs.push(arguments); } + log: function() { $log.log.logs.push(arguments); }, + warn: function() { $log.warn.logs.push(arguments); }, + info: function() { $log.info.logs.push(arguments); }, + error: function() { $log.error.logs.push(arguments); } }; $log.log.logs = []; |
