Enable webview tests on remote as well (#102444)

* Enable webview tests on remote as well

* Delete conditional test type
This commit is contained in:
Matt Bierner
2020-07-14 11:28:06 -07:00
committed by GitHub
parent 3ef3c105e6
commit a7285b471c
2 changed files with 10 additions and 25 deletions

View File

@@ -56,21 +56,6 @@ export function disposeAll(disposables: vscode.Disposable[]) {
vscode.Disposable.from(...disposables).dispose();
}
export function conditionalTest(name: string, testCallback: (done: MochaDone) => void | Thenable<any>) {
if (isTestTypeActive()) {
const async = !!testCallback.length;
if (async) {
test(name, (done) => testCallback(done));
} else {
test(name, () => (<() => void | Thenable<any>>testCallback)());
}
}
}
function isTestTypeActive(): boolean {
return !!vscode.extensions.getExtension('vscode-resolver-test');
}
export function delay(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}