From 49d15fa9774faeca11533a6e6eac7cdb60e3bf63 Mon Sep 17 00:00:00 2001 From: Rémi Tétreault Date: Sat, 27 May 2017 01:14:42 -0400 Subject: Update CHANGELOG and rebuild the lib --- spec/spec/fx.js | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/spec/fx.js b/spec/spec/fx.js index 17fbcc8..b1f0091 100644 --- a/spec/spec/fx.js +++ b/spec/spec/fx.js @@ -2556,21 +2556,47 @@ describe('FX', function() { expect(fx.add).toHaveBeenCalledWith('height', jasmine.objectContaining({value:60})) }) }) - + describe('width()', function() { it('should set width with add()', function() { spyOn(fx, 'add').and.callThrough() fx.width(20) expect(fx.add).toHaveBeenCalledWith('width', jasmine.objectContaining({value:20})) }) + + it('should animate the width attribute', function() { + fx.width(200) + expect(rect.width()).toBe(100) + + jasmine.clock().tick(250) + fx.step() + expect(rect.width()).toBe(150) + + jasmine.clock().tick(250) + fx.step() + expect(rect.width()).toBe(200) + }) }) - + describe('height()', function() { it('should set height with add()', function() { spyOn(fx, 'add').and.callThrough() fx.height(20) expect(fx.add).toHaveBeenCalledWith('height', jasmine.objectContaining({value:20})) }) + + it('should animate the height attribute', function() { + fx.height(200) + expect(rect.height()).toBe(100) + + jasmine.clock().tick(250) + fx.step() + expect(rect.height()).toBe(150) + + jasmine.clock().tick(250) + fx.step() + expect(rect.height()).toBe(200) + }) }) describe('plot()', function() { -- cgit v1.2.3