diff options
| author | Misko Hevery | 2011-10-07 11:27:49 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-10-11 11:01:46 -0700 |
| commit | fd822bdaf9d04e522aaa5400b673f333190abe98 (patch) | |
| tree | 451cd26d3f7da862692d6c56e6e8f235824c180a /src/angular-mocks.js | |
| parent | 4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (diff) | |
| download | angular.js-fd822bdaf9d04e522aaa5400b673f333190abe98.tar.bz2 | |
chore(formating): clean code to be function() {
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 = []; |
