diff options
| author | Matias Niemelä | 2013-08-28 19:18:33 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-09-03 17:06:49 -0700 |
| commit | 4382df03fa1962aed027742c1b463406c40653c9 (patch) | |
| tree | 833a70f04dcab4128f6a971a484bed9c7dc19fcf /test/ng/directive/ngClassSpec.js | |
| parent | d11a34a35127ee2b29a000ba48ec07200f2a5e34 (diff) | |
| download | angular.js-4382df03fa1962aed027742c1b463406c40653c9.tar.bz2 | |
fix(ngAnimate): cut down on extra $timeout calls
Diffstat (limited to 'test/ng/directive/ngClassSpec.js')
| -rw-r--r-- | test/ng/directive/ngClassSpec.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/ng/directive/ngClassSpec.js b/test/ng/directive/ngClassSpec.js index 54dee142..a7148b6c 100644 --- a/test/ng/directive/ngClassSpec.js +++ b/test/ng/directive/ngClassSpec.js @@ -321,29 +321,27 @@ describe('ngClass animations', function() { expect($animate.queue.length).toBe(0); $rootScope.val = 'one'; + $timeout.flush(); + $rootScope.$digest(); $animate.flushNext('addClass'); $animate.flushNext('addClass'); - $timeout.flush(); expect($animate.queue.length).toBe(0); $rootScope.val = ''; $rootScope.$digest(); $animate.flushNext('removeClass'); //only removeClass is called expect($animate.queue.length).toBe(0); - $timeout.flush(); $rootScope.val = 'one'; $rootScope.$digest(); $animate.flushNext('addClass'); - $timeout.flush(); expect($animate.queue.length).toBe(0); $rootScope.val = 'two'; $rootScope.$digest(); $animate.flushNext('removeClass'); $animate.flushNext('addClass'); - $timeout.flush(); expect($animate.queue.length).toBe(0); })); }); |
