Skip to content

Commit c100d6c

Browse files
committed
Fix a broken animation test
1 parent 77aaad2 commit c100d6c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/jasmine/tests/animate_test.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,11 @@ describe('Animate API details', function() {
593593

594594
var gd;
595595
var dur = 30;
596+
var mockCopy;
596597

597598
beforeEach(function(done) {
598599
gd = createGraphDiv();
599-
var mockCopy = Lib.extendDeep({}, mock);
600+
mockCopy = Lib.extendDeep({}, mock);
600601
Plotly.plot(gd, mockCopy.data, mockCopy.layout).then(done);
601602
});
602603

@@ -685,7 +686,9 @@ describe('Animate API details', function() {
685686
var cnt = 0;
686687
gd.on('plotly_animatingframe', function() {cnt++;});
687688

688-
Plotly.animate(gd, ['frame0', null, undefined], {transition: {duration: 0}, frame: {duration: 0}}).then(function() {
689+
Plotly.addFrames(gd, mockCopy.frames).then(function() {
690+
return Plotly.animate(gd, ['frame0', null, undefined], {transition: {duration: 0}, frame: {duration: 0}});
691+
}).then(function() {
689692
// Check only one animating was fired:
690693
expect(cnt).toEqual(1);
691694

0 commit comments

Comments
 (0)