aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngIncludeSpec.js
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/ng/directive/ngIncludeSpec.js
parent62761428eff3a53e69367449eb81869e59e75e39 (diff)
downloadangular.js-4c4537e65e6cf911c9659b562d89e3330ce3ffae.tar.bz2
perf($animate): use rAF instead of timeouts to issue animation callbacks
Diffstat (limited to 'test/ng/directive/ngIncludeSpec.js')
-rw-r--r--test/ng/directive/ngIncludeSpec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ng/directive/ngIncludeSpec.js b/test/ng/directive/ngIncludeSpec.js
index ebb35147..9f37d1fe 100644
--- a/test/ng/directive/ngIncludeSpec.js
+++ b/test/ng/directive/ngIncludeSpec.js
@@ -368,7 +368,7 @@ describe('ngInclude', function() {
expect(autoScrollSpy).not.toHaveBeenCalled();
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).toHaveBeenCalledOnce();
}));
@@ -385,7 +385,7 @@ describe('ngInclude', function() {
});
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
$rootScope.$apply(function () {
$rootScope.tpl = 'another.html';
@@ -394,7 +394,7 @@ describe('ngInclude', function() {
expect($animate.queue.shift().event).toBe('leave');
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
$rootScope.$apply(function() {
$rootScope.tpl = 'template.html';
@@ -403,7 +403,7 @@ describe('ngInclude', function() {
expect($animate.queue.shift().event).toBe('leave');
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).toHaveBeenCalled();
expect(autoScrollSpy.callCount).toBe(3);
@@ -419,7 +419,7 @@ describe('ngInclude', function() {
});
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).not.toHaveBeenCalled();
}));
@@ -435,7 +435,7 @@ describe('ngInclude', function() {
});
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
$rootScope.$apply(function () {
$rootScope.tpl = 'template.html';
@@ -457,7 +457,7 @@ describe('ngInclude', function() {
$rootScope.$apply("tpl = 'template.html'");
expect($animate.queue.shift().event).toBe('enter');
- $timeout.flush();
+ $animate.triggerCallbacks();
expect(autoScrollSpy).toHaveBeenCalledOnce();
}));