diff options
| author | Igor Minar | 2011-12-27 15:52:57 -0800 | 
|---|---|---|
| committer | Vojta Jina | 2012-01-09 13:17:48 -0800 | 
| commit | 63cca9afbcf7a772086eb4582d2f409c39e0ed12 (patch) | |
| tree | 521c9c1e493fb47ea3de1a4a9c08b71e47cb60af /test/angular-mocksSpec.js | |
| parent | d47ec772c3d6b418121c81bbaf2dcb8a24742125 (diff) | |
| download | angular.js-63cca9afbcf7a772086eb4582d2f409c39e0ed12.tar.bz2 | |
feat(browser.defer): flush should throw exception when queue is empty
Diffstat (limited to 'test/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index 5d0be7ad..a8328f41 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -291,6 +291,10 @@ describe('mocks', function() {        expect(browser.defer.now).toEqual(3);        expect(log).toEqual('A;B;C;');      }); + +    it('should throw an exception if there is nothing to be flushed', function() { +      expect(function() {browser.defer.flush();}).toThrow('No deferred tasks to be flushed'); +    });    }); | 
