diff options
author | Corentin J <corentinjule@gmail.com> | 2017-05-11 14:49:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-11 14:49:52 +0200 |
commit | 830e4c70b161fce24524455ef0bbd46a53b04fc8 (patch) | |
tree | 53393e696ade9294af1eee9732a8ed2d438f622b | |
parent | 7c9ec3c9b08a2a66e5420c25add5cf97c8dd15d1 (diff) | |
download | svg.js-830e4c70b161fce24524455ef0bbd46a53b04fc8.tar.gz svg.js-830e4c70b161fce24524455ef0bbd46a53b04fc8.zip |
Add unit tests for width & height animation
-rw-r--r-- | spec/spec/fx.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/spec/fx.js b/spec/spec/fx.js index d6d87f2..5cf4eb8 100644 --- a/spec/spec/fx.js +++ b/spec/spec/fx.js @@ -2539,6 +2539,22 @@ 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})) + }) + }) + + 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})) + }) + }) describe('plot()', function() { it('should call add with plot as method', function() { |