mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
feat(browser.defer): flush should throw exception when queue is empty
This commit is contained in:
4
test/angular-mocksSpec.js
vendored
4
test/angular-mocksSpec.js
vendored
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user