Report description for test failure when possible
This commit is contained in:
committed by
Andrew Eisenberg
parent
10e86f1835
commit
7a78fca252
@@ -104,6 +104,7 @@ export interface TestCompleted {
|
|||||||
evaluationMs: number;
|
evaluationMs: number;
|
||||||
expected: string;
|
expected: string;
|
||||||
diff: string[] | undefined;
|
diff: string[] | undefined;
|
||||||
|
failureDescription?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ export class QLTestAdapter extends DisposableObject implements TestAdapter {
|
|||||||
? 'errored'
|
? 'errored'
|
||||||
: 'failed';
|
: 'failed';
|
||||||
let message: string | undefined;
|
let message: string | undefined;
|
||||||
if (event.diff?.length) {
|
if (event.failureDescription || event.diff?.length) {
|
||||||
message = ['', `${state}: ${event.test}`, ...event.diff, ''].join('\n');
|
message = ['', `${state}: ${event.test}`, event.failureDescription || event.diff?.join('\n'), ''].join('\n');
|
||||||
testLogger.log(message);
|
testLogger.log(message);
|
||||||
}
|
}
|
||||||
this._testStates.fire({
|
this._testStates.fire({
|
||||||
|
|||||||
Reference in New Issue
Block a user