Skip to content

Commit 5bebe13

Browse files
committed
lint and simplify ricky's test of animate+sort
1 parent afb6ce6 commit 5bebe13

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

test/jasmine/tests/animate_test.js

+4-14
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,7 @@ describe('animating scatter traces', function() {
769769
}).catch(fail).then(done);
770770
});
771771

772-
it('computes calcdata correctly when transforms are present', function (done) {
773-
var isChecked = false;
774-
772+
it('computes calcdata correctly when transforms are present', function(done) {
775773
Plotly.plot(gd, {
776774
data: [{
777775
x: [1, 2, 3],
@@ -786,18 +784,10 @@ describe('animating scatter traces', function() {
786784
{name: 'frame1', data: [{y: [1, 2, 3]}]},
787785
{name: 'frame2', data: [{y: [3, 1, 2]}]}
788786
]
789-
}).then(function () {;
787+
}).then(function() {
790788
return Plotly.animate(gd, ['frame2'], {frame: {duration: 200, redraw: false}});
791-
}).then(function () {
792-
expect(isChecked).toBe(true);
789+
}).then(function() {
790+
expect(gd.calcdata[0][0].y).toEqual(3);
793791
}).catch(fail).then(done);
794-
795-
gd.on('plotly_animating', function () {
796-
setTimeout(function () {
797-
isChecked = true;
798-
console.log('gd.calcdata[0][0].y:', gd.calcdata[0][0].y);
799-
expect(gd.calcdata[0][0].y).toEqual(3);
800-
}, 100);
801-
})
802792
});
803793
});

0 commit comments

Comments
 (0)