mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
* notebook tests - run verbose (#165149) * bumpb * 💄
This commit is contained in:
@@ -66,10 +66,10 @@ export function delay(ms: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
export function withLogDisabled(runnable: () => Promise<any>): () => Promise<void> {
|
||||
function withLogLevel(level: string, runnable: () => Promise<any>): () => Promise<void> {
|
||||
return async (): Promise<void> => {
|
||||
const logLevel = await vscode.commands.executeCommand('_extensionTests.getLogLevel');
|
||||
await vscode.commands.executeCommand('_extensionTests.setLogLevel', 'off');
|
||||
await vscode.commands.executeCommand('_extensionTests.setLogLevel', level);
|
||||
|
||||
try {
|
||||
await runnable();
|
||||
@@ -79,6 +79,14 @@ export function withLogDisabled(runnable: () => Promise<any>): () => Promise<voi
|
||||
};
|
||||
}
|
||||
|
||||
export function withLogDisabled(runnable: () => Promise<any>): () => Promise<void> {
|
||||
return withLogLevel('off', runnable);
|
||||
}
|
||||
|
||||
export function withVerboseLogs(runnable: () => Promise<any>): () => Promise<void> {
|
||||
return withLogLevel('trace', runnable);
|
||||
}
|
||||
|
||||
export function assertNoRpc() {
|
||||
assertNoRpcFromEntry([vscode, 'vscode']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user