@@ -83,7 +83,7 @@ suite('Extension Test Suite', () => {
83
83
vscode . window . showInformationMessage ( 'Start all tests.' ) ;
84
84
85
85
suiteSetup ( async ( ) => {
86
- await deleteWorkspaceFiles ( ) ;
86
+ await deleteWorkspaceFiles ( ( [ fp , _ ] ) => fp !== 'settings.json' ) ;
87
87
await getHaskellConfig ( ) . update ( 'logFile' , 'hls.log' ) ;
88
88
await getHaskellConfig ( ) . update ( 'trace.server' , 'messages' ) ;
89
89
await getHaskellConfig ( ) . update ( 'releasesDownloadStoragePath' , path . normalize ( getWorkspaceFile ( 'bin' ) . fsPath ) ) ;
@@ -96,6 +96,7 @@ suite('Extension Test Suite', () => {
96
96
const pred = ( uri : vscode . Uri ) => ! [ 'download' , 'gz' , 'zip' ] . includes ( path . extname ( uri . fsPath ) ) ;
97
97
const exeExt = os . platform . toString ( ) === 'win32' ? '.exe' : '' ;
98
98
// Setting up watchers before actual tests start, to ensure we will got the created event
99
+ filesCreated . set ( 'ghcup' , existsWorkspaceFile ( `bin/ghcup${ exeExt } ` , pred ) ) ;
99
100
filesCreated . set ( 'wrapper' , existsWorkspaceFile ( `bin/.ghcup/bin/haskell-language-server-wrapper${ exeExt } ` , pred ) ) ;
100
101
filesCreated . set ( 'server' , existsWorkspaceFile ( `bin/.ghcup/bin/haskell-language-server-[1-9]*${ exeExt } ` , pred ) ) ;
101
102
filesCreated . set ( 'log' , existsWorkspaceFile ( 'hls.log' ) ) ;
@@ -119,6 +120,10 @@ suite('Extension Test Suite', () => {
119
120
test ( 'HLS executables should be downloaded' , async ( ) => {
120
121
await vscode . workspace . openTextDocument ( getWorkspaceFile ( 'Main.hs' ) ) ;
121
122
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
+ ) ;
122
127
assert . ok (
123
128
await withTimeout ( 60 , filesCreated . get ( 'wrapper' ) ! ) ,
124
129
'The wrapper executable was not downloaded in 60 seconds'
0 commit comments