Skip to content

Commit 60fb34b

Browse files
committed
fix tests that rely on timeout between setup and test
1 parent c6a6bbd commit 60fb34b

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/ext/command_bar_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ module.exports = {
585585
tooltipVisibilityCheck(true);
586586
commandBarTooltip.detach();
587587
},
588-
"test: does not display if the tooltip does not fit into the screen": function() {
588+
"test: does not display if the tooltip does not fit into the screen": async function() {
589+
await lang.sleep(0);
589590
createTooltip();
590591

591592
var testString = "a".repeat(100) +

src/scrollbar_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ module.exports = {
5050
editor.setOptions({
5151
customScrollbar: true
5252
});
53+
// TODO remove this when onresize doesn't recreate custom scrollbar
54+
renderer.$loop._flush();
5355
},
5456
tearDown: function () {
5557
editor && editor.destroy();

src/virtual_renderer_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ module.exports = {
481481
done();
482482
},
483483
"test: scroll cursor into view": function() {
484+
editor.renderer.$loop._flush();
485+
484486
function X(n) {
485487
return "X".repeat(n);
486488
}

0 commit comments

Comments
 (0)