diff options
author | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-05-27 01:14:42 -0400 |
---|---|---|
committer | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-05-27 01:20:09 -0400 |
commit | 49d15fa9774faeca11533a6e6eac7cdb60e3bf63 (patch) | |
tree | 63b58dc432228fbec7c4d7804c1fa9ebad609b66 /spec | |
parent | 3a496c6882a58ba10d354a90563d89c7b1e03279 (diff) | |
download | svg.js-49d15fa9774faeca11533a6e6eac7cdb60e3bf63.tar.gz svg.js-49d15fa9774faeca11533a6e6eac7cdb60e3bf63.zip |
Update CHANGELOG and rebuild the lib
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/fx.js | 30 |
1 files changed, 28 insertions, 2 deletions
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() { |