@@ -83,7 +83,7 @@ suite('Extension Test Suite', () => {
8383 vscode . window . showInformationMessage ( 'Start all tests.' ) ;
8484
8585 suiteSetup ( async ( ) => {
86- await deleteWorkspaceFiles ( ) ;
86+ await deleteWorkspaceFiles ( ( [ fp , _ ] ) => fp !== 'settings.json' ) ;
8787 await getHaskellConfig ( ) . update ( 'logFile' , 'hls.log' ) ;
8888 await getHaskellConfig ( ) . update ( 'trace.server' , 'messages' ) ;
8989 await getHaskellConfig ( ) . update ( 'releasesDownloadStoragePath' , path . normalize ( getWorkspaceFile ( 'bin' ) . fsPath ) ) ;
@@ -96,6 +96,7 @@ suite('Extension Test Suite', () => {
9696 const pred = ( uri : vscode . Uri ) => ! [ 'download' , 'gz' , 'zip' ] . includes ( path . extname ( uri . fsPath ) ) ;
9797 const exeExt = os . platform . toString ( ) === 'win32' ? '.exe' : '' ;
9898 // Setting up watchers before actual tests start, to ensure we will got the created event
99+ filesCreated . set ( 'ghcup' , existsWorkspaceFile ( `bin/ghcup${ exeExt } ` , pred ) ) ;
99100 filesCreated . set ( 'wrapper' , existsWorkspaceFile ( `bin/.ghcup/bin/haskell-language-server-wrapper${ exeExt } ` , pred ) ) ;
100101 filesCreated . set ( 'server' , existsWorkspaceFile ( `bin/.ghcup/bin/haskell-language-server-[1-9]*${ exeExt } ` , pred ) ) ;
101102 filesCreated . set ( 'log' , existsWorkspaceFile ( 'hls.log' ) ) ;
@@ -119,6 +120,10 @@ suite('Extension Test Suite', () => {
119120 test ( 'HLS executables should be downloaded' , async ( ) => {
120121 await vscode . workspace . openTextDocument ( getWorkspaceFile ( 'Main.hs' ) ) ;
121122 console . log ( 'Testing wrapper' ) ;
123+ assert . ok (
124+ await withTimeout ( 60 , filesCreated . get ( 'ghcup' ) ! ) ,
125+ 'The ghcup executable was not downloaded in 60 seconds'
126+ ) ;
122127 assert . ok (
123128 await withTimeout ( 60 , filesCreated . get ( 'wrapper' ) ! ) ,
124129 'The wrapper executable was not downloaded in 60 seconds'
0 commit comments