File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
cursorless-vscode-e2e/src/suite
vscode-common/src/testUtil Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ import { sleep } from "@cursorless/common" ;
12import {
23 getCursorlessApi ,
34 openNewNotebookEditor ,
@@ -19,6 +20,8 @@ async function runTest() {
1920
2021 await openNewNotebookEditor ( [ '"hello"' , '"world"' ] ) ;
2122
23+ await sleep ( 200 ) ;
24+
2225 await hatTokenMap . allocateHats ( ) ;
2326
2427 await runCursorlessCommand ( {
Original file line number Diff line number Diff line change @@ -103,14 +103,13 @@ export async function openNewNotebookEditor(
103103 return document ;
104104}
105105
106- function waitForEditorToOpen ( ) {
106+ function waitForEditorToOpen ( ) : Promise < void > {
107107 return new Promise < void > ( ( resolve , reject ) => {
108108 let count = 0 ;
109109 const interval = setInterval ( ( ) => {
110110 if ( vscode . window . activeTextEditor != null ) {
111111 clearInterval ( interval ) ;
112- // Give it a moment to settle
113- setTimeout ( resolve , 100 ) ;
112+ resolve ( ) ;
114113 } else {
115114 count ++ ;
116115 if ( count === 20 ) {
You can’t perform that action at this time.
0 commit comments