diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/fx.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/spec/fx.js b/spec/spec/fx.js index 5849598..f050a2a 100644 --- a/spec/spec/fx.js +++ b/spec/spec/fx.js @@ -148,13 +148,18 @@ describe('FX', function() { fx.speed(0.5) expect(fx.speed()).toBe(0.5) - fx.speed(0) - expect(fx.speed()).toBe(0.5) - fx.speed(1) expect(fx.speed()).toBe(1) }) + it('pause the animation when a speed of 0 is passed', function(){ + var currentSpeed = fx.speed() + + expect(fx.speed(0)).toBe(fx) + expect(fx.speed()).toBe(currentSpeed) + expect(fx.paused).toBe(true) + }) + it('should affect all animations in the queue', function(done){ fx.speed(2).animate(300).start() expect(fx.situations.length).not.toBe(0) |