MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / MockCommands

Class MockCommands

src/test/vscode-mock.ts:23–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23export class MockCommands {
24 public log: string[] = [];
25 public registerCommand(_command: string, _callback: (...args: any[]) => any, _thisArg?: any): vscode.Disposable {
26 return { dispose: noop };
27 }
28
29 public registerTextEditorCommand(
30 _command: string,
31 _callback: (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => void,
32 _thisArg?: any
33 ): vscode.Disposable {
34 return { dispose: noop };
35 }
36
37 public executeCommand<T>(command: string, ..._rest: any[]): Thenable<T | undefined> {
38 this.log.push(command);
39 return Promise.resolve(undefined);
40 }
41
42 public getCommands(_filterInternal?: boolean): Thenable<string[]> {
43 return Promise.resolve([]);
44 }
45}
46
47class MockClipboard {
48 private text: string = '';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected