mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-30 21:41:46 +01:00
tests - reduce output of integration tests (#84283)
This commit is contained in:
@@ -70,3 +70,16 @@ function isTestTypeActive(): boolean {
|
||||
export function delay(ms: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
export function withLogDisabled(runnable: () => Promise<any>): () => Promise<void> {
|
||||
return async (): Promise<void> => {
|
||||
const logLevel = await vscode.commands.executeCommand('_extensionTests.getLogLevel');
|
||||
await vscode.commands.executeCommand('_extensionTests.setLogLevel', 6 /* critical */);
|
||||
|
||||
try {
|
||||
await runnable();
|
||||
} finally {
|
||||
await vscode.commands.executeCommand('_extensionTests.setLogLevel', logLevel);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user