aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngMock/angular-mocksSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ngMock/angular-mocksSpec.js')
-rw-r--r--test/ngMock/angular-mocksSpec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js
index 37bf001a..4d238891 100644
--- a/test/ngMock/angular-mocksSpec.js
+++ b/test/ngMock/angular-mocksSpec.js
@@ -365,6 +365,21 @@ describe('ngMock', function() {
$timeout.flush(900);
expect(function() {$timeout.verifyNoPendingTasks();}).not.toThrow();
}));
+
+
+ it('should assert against the delay value', inject(function($timeout) {
+ var count = 0;
+ var iterate = function() {
+ count++;
+ };
+
+ $timeout(iterate, 100);
+ $timeout(iterate, 123);
+ $timeout.flushNext(100);
+ expect(count).toBe(1);
+ $timeout.flushNext(123);
+ expect(count).toBe(2);
+ }));
});