parent
ffee42566a
commit
ef72141fd1
|
@ -290,7 +290,7 @@ export async function scanTestOutput(
|
|||
enqueueExitBlocker(
|
||||
(async () => {
|
||||
const stackInfo = await deriveStackLocations(store, rawErr, tcase!);
|
||||
let message: vscode.TestMessage2;
|
||||
let message: vscode.TestMessage;
|
||||
|
||||
if (hasDiff) {
|
||||
message = new vscode.TestMessage(tryMakeMarkdown(err));
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
"src/**/*",
|
||||
"../../../src/vscode-dts/vscode.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.testObserver.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.testMessageStackTrace.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.testRelatedCode.d.ts",
|
||||
"../../../src/vscode-dts/vscode.proposed.attributableCoverage.d.ts"
|
||||
]
|
||||
|
|
|
@ -356,9 +356,6 @@ const _allApiProposals = {
|
|||
terminalSelection: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalSelection.d.ts',
|
||||
},
|
||||
testMessageStackTrace: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testMessageStackTrace.d.ts',
|
||||
},
|
||||
testObserver: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts',
|
||||
},
|
||||
|
|
|
@ -1770,7 +1770,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
TestResultState: extHostTypes.TestResultState,
|
||||
TestRunRequest: extHostTypes.TestRunRequest,
|
||||
TestMessage: extHostTypes.TestMessage,
|
||||
TestMessage2: extHostTypes.TestMessage,
|
||||
TestMessageStackFrame: extHostTypes.TestMessageStackFrame,
|
||||
TestTag: extHostTypes.TestTag,
|
||||
TestRunProfileKind: extHostTypes.TestRunProfileKind,
|
||||
|
|
|
@ -1893,7 +1893,7 @@ export namespace TestMessage {
|
|||
actual: message.actualOutput,
|
||||
contextValue: message.contextValue,
|
||||
location: message.location && ({ range: Range.from(message.location.range), uri: message.location.uri }),
|
||||
stackTrace: (message as vscode.TestMessage2).stackTrace?.map(s => ({
|
||||
stackTrace: message.stackTrace?.map(s => ({
|
||||
label: s.label,
|
||||
position: s.position && Position.from(s.position),
|
||||
uri: s.uri && URI.revive(s.uri).toJSON(),
|
||||
|
|
|
@ -18093,6 +18093,34 @@ declare module 'vscode' {
|
|||
error: string | MarkdownString | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* A stack frame found in the {@link TestMessage.stackTrace}.
|
||||
*/
|
||||
export class TestMessageStackFrame {
|
||||
/**
|
||||
* The location of this stack frame. This should be provided as a URI if the
|
||||
* location of the call frame can be accessed by the editor.
|
||||
*/
|
||||
uri?: Uri;
|
||||
|
||||
/**
|
||||
* Position of the stack frame within the file.
|
||||
*/
|
||||
position?: Position;
|
||||
|
||||
/**
|
||||
* The name of the stack frame, typically a method or function name.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* @param label The name of the stack frame
|
||||
* @param file The file URI of the stack frame
|
||||
* @param position The position of the stack frame within the file
|
||||
*/
|
||||
constructor(label: string, uri?: Uri, position?: Position);
|
||||
}
|
||||
|
||||
/**
|
||||
* Message associated with the test state. Can be linked to a specific
|
||||
* source range -- useful for assertion failures, for example.
|
||||
|
@ -18149,6 +18177,11 @@ declare module 'vscode' {
|
|||
*/
|
||||
contextValue?: string;
|
||||
|
||||
/**
|
||||
* The stack trace associated with the message or failure.
|
||||
*/
|
||||
stackTrace?: TestMessageStackFrame[];
|
||||
|
||||
/**
|
||||
* Creates a new TestMessage that will present as a diff in the editor.
|
||||
* @param message Message to display to the user.
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
export class TestMessage2 extends TestMessage {
|
||||
/**
|
||||
* The stack trace associated with the message or failure.
|
||||
*/
|
||||
stackTrace?: TestMessageStackFrame[];
|
||||
}
|
||||
|
||||
export class TestMessageStackFrame {
|
||||
/**
|
||||
* The location of this stack frame. This should be provided as a URI if the
|
||||
* location of the call frame can be accessed by the editor.
|
||||
*/
|
||||
uri?: Uri;
|
||||
|
||||
/**
|
||||
* Position of the stack frame within the file.
|
||||
*/
|
||||
position?: Position;
|
||||
|
||||
/**
|
||||
* The name of the stack frame, typically a method or function name.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* @param label The name of the stack frame
|
||||
* @param file The file URI of the stack frame
|
||||
* @param position The position of the stack frame within the file
|
||||
*/
|
||||
constructor(label: string, uri?: Uri, position?: Position);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue