fix - Show error message when test runner finishes (#1713)
This commit is contained in:
Родитель
f86932f8f3
Коммит
e78dc4aa09
|
@ -362,11 +362,14 @@ async function executeWithTestRunner(option: IRunOption, testRunner: TestRunner,
|
|||
}
|
||||
}));
|
||||
|
||||
disposables.push(testRunner.onDidFinishTestRun((_event: TestFinishEvent) => {
|
||||
disposables.push(testRunner.onDidFinishTestRun((event: TestFinishEvent) => {
|
||||
if (event.statusCode !== 0) {
|
||||
window.showErrorMessage(event.message ?? 'Failed to run tests.');
|
||||
}
|
||||
return resolve();
|
||||
}));
|
||||
|
||||
testRunner.launch(testContext);
|
||||
await testRunner.launch(testContext);
|
||||
});
|
||||
|
||||
function findTestClass(parts: TestIdParts): TestItem {
|
||||
|
|
|
@ -54,10 +54,10 @@ export interface TestIdParts {
|
|||
*/
|
||||
export interface TestRunner {
|
||||
/**
|
||||
* launch test test execution.
|
||||
* launch the test execution.
|
||||
* @param context the context for this test run.
|
||||
*/
|
||||
launch(context: IRunTestContext): void;
|
||||
launch(context: IRunTestContext): vscode.ProviderResult<void>;
|
||||
|
||||
/**
|
||||
* Event that should be emitted when the status of a test item changes.
|
||||
|
|
Загрузка…
Ссылка в новой задаче