Skip to content

Commit 62d3209

Browse files
committed
Match any whitespace
1 parent 42935a6 commit 62d3209

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/suite/extension.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ async function deleteFiles(dir: vscode.Uri, pred?: (fileType: [string, vscode.Fi
5555
if (!pred || pred([name, type])) {
5656
console.log(`Deleting ${uri}`);
5757
await vscode.workspace.fs.delete(getWorkspaceFile(name), {
58-
recursive: true, useTrash: false
58+
recursive: true,
59+
useTrash: false,
5960
});
6061
}
6162
});
@@ -86,13 +87,15 @@ suite('Extension Test Suite', () => {
8687
await getHaskellConfig().update('logFile', 'hls.log');
8788
await getHaskellConfig().update('trace.server', 'messages');
8889
await getHaskellConfig().update('releasesDownloadStoragePath', path.normalize(getWorkspaceFile('bin').fsPath));
89-
await getHaskellConfig().update('serverEnvironment',
90-
{ XDG_CACHE_HOME: path.normalize(getWorkspaceFile('cache-test').fsPath) });
90+
await getHaskellConfig().update('serverEnvironment', {
91+
XDG_CACHE_HOME: path.normalize(getWorkspaceFile('cache-test').fsPath),
92+
});
9193
const contents = new TextEncoder().encode('main = putStrLn "hi vscode tests"');
9294
await vscode.workspace.fs.writeFile(getWorkspaceFile('Main.hs'), contents);
9395

9496
const pred = (uri: vscode.Uri) => !['download', 'gz', 'zip'].includes(path.extname(uri.fsPath));
9597
const exeExt = os.platform.toString() === 'win32' ? '.exe' : '';
98+
// Setting up watchers before actual tests start, to ensure we will got the created event
9699
filesCreated.set('wrapper', existsWorkspaceFile(`bin/haskell-language-server-wrapper*${exeExt}`, pred));
97100
filesCreated.set('server', existsWorkspaceFile(`bin/haskell-language-server-[1-9]*${exeExt}`, pred));
98101
filesCreated.set('log', existsWorkspaceFile('hls.log'));
@@ -132,8 +135,7 @@ suite('Extension Test Suite', () => {
132135
await delay(10);
133136
const logContents = getExtensionLogContent();
134137
assert.ok(logContents, 'Extension log file does not exist');
135-
assert.match(logContents, /INFO hls: Registering ide configuration/,
136-
'Extension log file has no hls output');
138+
assert.match(logContents, /INFO hls:\s+Registering ide configuration/, 'Extension log file has no hls output');
137139
});
138140

139141
test('Server should inherit environment variables defined in the settings', async () => {

0 commit comments

Comments
 (0)