aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngRoute/directive
diff options
context:
space:
mode:
authorMatias Niemelä2014-02-24 19:43:57 -0500
committerMatias Niemelä2014-02-24 21:23:18 -0500
commit4c4537e65e6cf911c9659b562d89e3330ce3ffae (patch)
tree3f9e6736a314073b5516beab3c86d7709e887b6b /test/ngRoute/directive
parent62761428eff3a53e69367449eb81869e59e75e39 (diff)
downloadangular.js-4c4537e65e6cf911c9659b562d89e3330ce3ffae.tar.bz2
perf($animate): use rAF instead of timeouts to issue animation callbacks
Diffstat (limited to 'test/ngRoute/directive')
-rw-r--r--test/ngRoute/directive/ngViewSpec.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ngRoute/directive/ngViewSpec.js b/test/ngRoute/directive/ngViewSpec.js
index 072c232b..259940c6 100644
--- a/test/ngRoute/directive/ngViewSpec.js
+++ b/test/ngRoute/directive/ngViewSpec.js
@@ -707,7 +707,7 @@ describe('ngView animations', function() {
$location.path('/foo');
$rootScope.$digest();
- $timeout.flush();
+ $animate.triggerCallbacks();
$location.path('/');
$rootScope.$digest();
@@ -872,7 +872,7 @@ describe('ngView animations', function() {
$location.path('/foo');
$rootScope.$digest();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).toHaveBeenCalledOnce();
}));
@@ -886,7 +886,7 @@ describe('ngView animations', function() {
$location.path('/foo');
$rootScope.$digest();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).toHaveBeenCalledOnce();
}));
@@ -899,7 +899,7 @@ describe('ngView animations', function() {
$location.path('/foo');
$rootScope.$digest();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).not.toHaveBeenCalled();
}));
@@ -913,7 +913,7 @@ describe('ngView animations', function() {
$location.path('/foo');
$rootScope.$digest();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).not.toHaveBeenCalled();
}));
@@ -930,7 +930,7 @@ describe('ngView animations', function() {
expect(autoScrollSpy).not.toHaveBeenCalled();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect($animate.enter).toHaveBeenCalledOnce();
expect(autoScrollSpy).toHaveBeenCalledOnce();