Report description for test failure when possible
This commit is contained in:
Родитель
10e86f1835
Коммит
7a78fca252
|
@ -104,6 +104,7 @@ export interface TestCompleted {
|
|||
evaluationMs: number;
|
||||
expected: string;
|
||||
diff: string[] | undefined;
|
||||
failureDescription?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -223,8 +223,8 @@ export class QLTestAdapter extends DisposableObject implements TestAdapter {
|
|||
? 'errored'
|
||||
: 'failed';
|
||||
let message: string | undefined;
|
||||
if (event.diff?.length) {
|
||||
message = ['', `${state}: ${event.test}`, ...event.diff, ''].join('\n');
|
||||
if (event.failureDescription || event.diff?.length) {
|
||||
message = ['', `${state}: ${event.test}`, event.failureDescription || event.diff?.join('\n'), ''].join('\n');
|
||||
testLogger.log(message);
|
||||
}
|
||||
this._testStates.fire({
|
||||
|
|
Загрузка…
Ссылка в новой задаче