mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
57 lines
1 KiB
JavaScript
57 lines
1 KiB
JavaScript
const vscode = {
|
|
window: {
|
|
showInformationMessage: jest.fn(),
|
|
showErrorMessage: jest.fn(),
|
|
createTextEditorDecorationType: jest.fn().mockReturnValue({
|
|
dispose: jest.fn(),
|
|
}),
|
|
},
|
|
workspace: {
|
|
onDidSaveTextDocument: jest.fn(),
|
|
},
|
|
Disposable: class {
|
|
dispose() {}
|
|
},
|
|
Uri: {
|
|
file: (path) => ({
|
|
fsPath: path,
|
|
scheme: "file",
|
|
authority: "",
|
|
path: path,
|
|
query: "",
|
|
fragment: "",
|
|
with: jest.fn(),
|
|
toJSON: jest.fn(),
|
|
}),
|
|
},
|
|
EventEmitter: class {
|
|
constructor() {
|
|
this.event = jest.fn()
|
|
this.fire = jest.fn()
|
|
}
|
|
},
|
|
ConfigurationTarget: {
|
|
Global: 1,
|
|
Workspace: 2,
|
|
WorkspaceFolder: 3,
|
|
},
|
|
Position: class {
|
|
constructor(line, character) {
|
|
this.line = line
|
|
this.character = character
|
|
}
|
|
},
|
|
Range: class {
|
|
constructor(startLine, startCharacter, endLine, endCharacter) {
|
|
this.start = new vscode.Position(startLine, startCharacter)
|
|
this.end = new vscode.Position(endLine, endCharacter)
|
|
}
|
|
},
|
|
ThemeColor: class {
|
|
constructor(id) {
|
|
this.id = id
|
|
}
|
|
},
|
|
}
|
|
|
|
module.exports = vscode
|