feat(browser.defer): flush should throw exception when queue is empty

This commit is contained in:
Igor Minar
2011-12-27 15:52:57 -08:00
committed by Vojta Jina
parent d47ec772c3
commit 63cca9afbc
3 changed files with 7 additions and 1 deletions

View File

@@ -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');
});
});