mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Vscode test runner support (#20645)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user