summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorRémi Tétreault <tetreault.remi@gmail.com>2017-05-26 18:51:36 -0400
committerGitHub <noreply@github.com>2017-05-26 18:51:36 -0400
commitdbbcc1669883f284125b4a1facf3120fa534ba8e (patch)
tree733772832a6d7534835d62909401d418775dab00 /spec
parentd80d692271345f73c45be0b67d44e3e3c1ecf35c (diff)
parent830e4c70b161fce24524455ef0bbd46a53b04fc8 (diff)
downloadsvg.js-dbbcc1669883f284125b4a1facf3120fa534ba8e.tar.gz
svg.js-dbbcc1669883f284125b4a1facf3120fa534ba8e.zip
Merge pull request #676 from jcorentin/fix-height-width-animation
Make width() and height() setters animatable
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/fx.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/spec/fx.js b/spec/spec/fx.js
index edf2081..17fbcc8 100644
--- a/spec/spec/fx.js
+++ b/spec/spec/fx.js
@@ -2556,6 +2556,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() {