mirror of
https://github.com/tweenjs/tween.js.git
synced 2025-12-08 20:16:12 +00:00
Add a test for zero-duration case.
This commit is contained in:
parent
edc42b22c0
commit
daec732aa6
@ -1125,6 +1125,20 @@
|
||||
TWEEN.update(150);
|
||||
test.equal(t.isPlaying(), false);
|
||||
|
||||
test.done();
|
||||
},
|
||||
|
||||
'A zero-duration tween finishes at its starting time without an error.': function(test) {
|
||||
TWEEN.removeAll();
|
||||
|
||||
let object = {x: 0};
|
||||
var t = new TWEEN.Tween(object).to({x:1}, 0);
|
||||
t.start(0);
|
||||
TWEEN.update(0);
|
||||
|
||||
test.equal(t.isPlaying(), false);
|
||||
test.equal(object.x, 1);
|
||||
|
||||
test.done();
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user