diff options
author | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-04-30 15:14:11 -0400 |
---|---|---|
committer | Rémi Tétreault <tetreault.remi@gmail.com> | 2017-04-30 15:14:11 -0400 |
commit | 0ba5e1f394911c66441ea770e09338e82fb6ef49 (patch) | |
tree | df6c225df194a9292803ca2d57b98debfb8368da /spec | |
parent | 4204181064ab17c82fc0cde227a84e31512d6973 (diff) | |
download | svg.js-0ba5e1f394911c66441ea770e09338e82fb6ef49.tar.gz svg.js-0ba5e1f394911c66441ea770e09338e82fb6ef49.zip |
fixed `SVG.FX.once` so that it add its callback on the last situation instead of the current one
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/fx.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/spec/fx.js b/spec/spec/fx.js index 78101d4..e17cb95 100644 --- a/spec/spec/fx.js +++ b/spec/spec/fx.js @@ -1227,6 +1227,15 @@ describe('FX', function() { fx.step() expect(called).toBe(true) }) + + it('adds the callback on the last situation', function () { + var callback = function () {} + + fx.animate(500).animate(500).once(0.5, callback) + expect(fx.situation.once['0.5']).toBeUndefined() + expect(fx.situations[0].once['0.5']).toBeUndefined() + expect(fx.situations[1].once['0.5']).toBe(callback) + }) }) |