Vscode test runner support (#20645)

This commit is contained in:
Michael H
2025-07-14 14:57:44 +10:00
committed by GitHub
parent 499eac0d49
commit 8898c4c455
23 changed files with 2301 additions and 561 deletions

View File

@@ -107,6 +107,8 @@ type InitializeRequest = DAP.InitializeRequest & {
supportsConfigurationDoneRequest?: boolean;
enableControlFlowProfiler?: boolean;
enableDebugger?: boolean;
enableTestReporter?: boolean;
enableConsole?: boolean | true;
} & (
| {
enableLifecycleAgentReporter?: false;
@@ -459,7 +461,10 @@ export abstract class BaseDebugAdapter<T extends Inspector = Inspector>
this.send("Inspector.enable");
this.send("Runtime.enable");
this.send("Console.enable");
if (request.enableConsole ?? true) {
this.send("Console.enable");
}
if (request.enableControlFlowProfiler) {
this.send("Runtime.enableControlFlowProfiler");
@@ -473,6 +478,10 @@ export abstract class BaseDebugAdapter<T extends Inspector = Inspector>
}
}
if (request.enableTestReporter) {
this.send("TestReporter.enable");
}
// use !== false because by default if unspecified we want to enable the debugger
// and this option didn't exist beforehand, so we can't make it non-optional
if (request.enableDebugger !== false) {