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 /test/BrowserSpecs.js | |
| parent | 4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (diff) | |
| download | angular.js-fd822bdaf9d04e522aaa5400b673f333190abe98.tar.bz2 | |
chore(formating): clean code to be function() {
Diffstat (limited to 'test/BrowserSpecs.js')
| -rw-r--r-- | test/BrowserSpecs.js | 30 | 
1 files changed, 15 insertions, 15 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js index 692bc5ae..511bb643 100644 --- a/test/BrowserSpecs.js +++ b/test/BrowserSpecs.js @@ -46,11 +46,11 @@ function MockWindow() {    };  } -describe('browser', function(){ +describe('browser', function() {    var browser, fakeWindow, xhr, logs, scripts, removedScripts, sniffer; -  beforeEach(function(){ +  beforeEach(function() {      scripts = [];      removedScripts = [];      xhr = null; @@ -60,7 +60,7 @@ describe('browser', function(){      var fakeBody = [{appendChild: function(node){scripts.push(node);},                       removeChild: function(node){removedScripts.push(node);}}]; -    var FakeXhr = function(){ +    var FakeXhr = function() {        xhr = this;        this.open = function(method, url, async){          xhr.method = method; @@ -91,14 +91,14 @@ describe('browser', function(){      expect(browser.cookies).toBeDefined();    }); -  describe('outstading requests', function(){ -    it('should process callbacks immedietly with no outstanding requests', function(){ +  describe('outstading requests', function() { +    it('should process callbacks immedietly with no outstanding requests', function() {        var callback = jasmine.createSpy('callback');        browser.notifyWhenNoOutstandingRequests(callback);        expect(callback).toHaveBeenCalled();      }); -    it('should queue callbacks with outstanding requests', function(){ +    it('should queue callbacks with outstanding requests', function() {        var callback = jasmine.createSpy('callback');        browser.xhr('GET', '/url', null, noop);        browser.notifyWhenNoOutstandingRequests(callback); @@ -110,8 +110,8 @@ describe('browser', function(){      });    }); -  describe('xhr', function(){ -    describe('JSON', function(){ +  describe('xhr', function() { +    describe('JSON', function() {        var log;        function callback(code, data) { @@ -478,12 +478,12 @@ describe('browser', function(){    }); -  describe('poller', function(){ +  describe('poller', function() { -    it('should call functions in pollFns in regular intervals', function(){ +    it('should call functions in pollFns in regular intervals', function() {        var log = ''; -      browser.addPollFn(function(){log+='a';}); -      browser.addPollFn(function(){log+='b';}); +      browser.addPollFn(function() {log+='a';}); +      browser.addPollFn(function() {log+='b';});        expect(log).toEqual('');        fakeWindow.setTimeout.flush();        expect(log).toEqual('ab'); @@ -491,14 +491,14 @@ describe('browser', function(){        expect(log).toEqual('abab');      }); -    it('should startPoller', function(){ +    it('should startPoller', function() {        expect(fakeWindow.timeouts.length).toEqual(0); -      browser.addPollFn(function(){}); +      browser.addPollFn(function() {});        expect(fakeWindow.timeouts.length).toEqual(1);        //should remain 1 as it is the check fn -      browser.addPollFn(function(){}); +      browser.addPollFn(function() {});        expect(fakeWindow.timeouts.length).toEqual(1);      });  | 
