tests: fix not exiting if tests rejected with undefined

Fixes https://github.com/microsoft/vscode-test/issues/119
This commit is contained in:
Connor Peet
2021-12-29 09:09:21 -08:00
parent bace3f87fb
commit 90b1267d89

View File

@@ -614,8 +614,8 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
.then(() => {
resolve(0);
})
.catch((err: Error) => {
reject(err.toString());
.catch((err: unknown) => {
reject(err instanceof Error && err.stack ? err.stack : String(err));
});
}
});