Skip to content

Commit 50e36f5

Browse files
committed
reject hover promise if didn't resolve after 100ms
1 parent d49f0ad commit 50e36f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/jasmine/tests/transform_sort_test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,18 @@ describe('Test sort transform interactions:', function() {
273273
}
274274

275275
function hover(gd, id) {
276-
return new Promise(function(resolve) {
276+
return new Promise(function(resolve, reject) {
277277
gd.once('plotly_hover', function(eventData) {
278278
delete gd._lastHoverTime;
279279
resolve(eventData);
280280
});
281281

282282
var pos = getPxPos(gd, id);
283283
mouseEvent('mousemove', pos[0], pos[1]);
284+
285+
setTimeout(function() {
286+
reject('plotly_hover did not get called!');
287+
}, 100);
284288
});
285289
}
286290

0 commit comments

Comments
 (0)