We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db73cb3 commit f63a125Copy full SHA for f63a125
src/carousel/test/carousel.spec.js
@@ -294,6 +294,20 @@ describe('carousel', function() {
294
expect(ctrl.slides.length).toBe(1);
295
expect(ctrl.currentSlide).toBe(ctrl.slides[0]);
296
});
297
+
298
+ it('issue 1414 - should not continue running timers after scope is destroyed', function() {
299
+ spyOn(scope, 'next').andCallThrough();
300
+ scope.interval = 2000;
301
+ scope.$digest();
302
303
+ $timeout.flush();
304
+ expect(scope.next.calls.length).toBe(1);
305
306
+ scope.$destroy();
307
308
+ $timeout.flush(scope.interval);
309
310
+ });
311
312
313
0 commit comments