|
| 1 | +const languages = { |
| 2 | + createDiagnosticCollection: jest.fn(), |
| 3 | + registerCodeLensProvider: jest.fn(), |
| 4 | +}; |
| 5 | + |
| 6 | +const StatusBarAlignment = { Left: 1, Right: 2 }; |
| 7 | + |
| 8 | +const window = { |
| 9 | + createStatusBarItem: jest.fn(() => ({ |
| 10 | + show: jest.fn(), |
| 11 | + tooltip: jest.fn(), |
| 12 | + })), |
| 13 | + showErrorMessage: jest.fn(), |
| 14 | + showWarningMessage: jest.fn(), |
| 15 | + createTextEditorDecorationType: jest.fn(), |
| 16 | + createOutputChannel: jest.fn(), |
| 17 | + showWorkspaceFolderPick: jest.fn(), |
| 18 | + onDidChangeActiveTextEditor: jest.fn(), |
| 19 | + showInformationMessage: jest.fn(), |
| 20 | + createWebviewPanel: jest.fn(), |
| 21 | +}; |
| 22 | + |
| 23 | +const workspace = { |
| 24 | + getConfiguration: jest.fn().mockReturnValue({ |
| 25 | + get: jest.fn(), |
| 26 | + update: jest.fn(), |
| 27 | + has: jest.fn(), |
| 28 | + inspect: jest.fn(), |
| 29 | + }), |
| 30 | + workspaceFolders: [], |
| 31 | + getWorkspaceFolder: jest.fn(), |
| 32 | + |
| 33 | + onDidChangeConfiguration: jest.fn(), |
| 34 | + onDidChangeTextDocument: jest.fn(), |
| 35 | + onDidChangeWorkspaceFolders: jest.fn(), |
| 36 | + onDidCreateFiles: jest.fn(), |
| 37 | + onDidDeleteFiles: jest.fn(), |
| 38 | + onDidRenameFiles: jest.fn(), |
| 39 | + onDidSaveTextDocument: jest.fn(), |
| 40 | + onWillSaveTextDocument: jest.fn(), |
| 41 | +}; |
| 42 | + |
| 43 | +const OverviewRulerLane = { |
| 44 | + Left: null, |
| 45 | +}; |
| 46 | + |
| 47 | +const Uri = { |
| 48 | + // @ts-ignore |
| 49 | + file: f => f, |
| 50 | + parse: jest.fn(), |
| 51 | + joinPath: jest.fn(), |
| 52 | +}; |
| 53 | +const Range = jest.fn(); |
| 54 | +const Location = jest.fn(); |
| 55 | +const Position = jest.fn(); |
| 56 | +const Diagnostic = jest.fn(); |
| 57 | +const ThemeIcon = jest.fn(); |
| 58 | +const DiagnosticSeverity = { Error: 0, Warning: 1, Information: 2, Hint: 3 }; |
| 59 | +const ConfigurationTarget = { Global: 1, Workspace: 2, WorkspaceFolder: 3 }; |
| 60 | + |
| 61 | +const debug = { |
| 62 | + onDidTerminateDebugSession: jest.fn(), |
| 63 | + startDebugging: jest.fn(), |
| 64 | + registerDebugConfigurationProvider: jest.fn(), |
| 65 | +}; |
| 66 | + |
| 67 | +const commands = { |
| 68 | + executeCommand: jest.fn(), |
| 69 | + registerCommand: jest.fn(), |
| 70 | + registerTextEditorCommand: jest.fn(), |
| 71 | +}; |
| 72 | + |
| 73 | +// eslint-disable-next-line @typescript-eslint/no-empty-function |
| 74 | +const CodeLens = function CodeLens() {}; |
| 75 | + |
| 76 | +const QuickInputButtons = { |
| 77 | + Back: {}, |
| 78 | +}; |
| 79 | + |
| 80 | +const tests = { |
| 81 | + createTestController: jest.fn(), |
| 82 | +}; |
| 83 | + |
| 84 | +const TestRunProfileKind = { |
| 85 | + Run: 1, |
| 86 | + Debug: 2, |
| 87 | + Coverage: 3, |
| 88 | +}; |
| 89 | +const ViewColumn = { |
| 90 | + One: 1, |
| 91 | + Tow: 2, |
| 92 | +}; |
| 93 | + |
| 94 | +const TestMessage = jest.fn(); |
| 95 | +const TestRunRequest = jest.fn(); |
| 96 | +const ThemeColor = jest.fn(); |
| 97 | + |
| 98 | +const EventEmitter = jest.fn().mockImplementation(() => { |
| 99 | + return { |
| 100 | + fire: jest.fn(), |
| 101 | + }; |
| 102 | +}); |
| 103 | + |
| 104 | +const QuickPickItemKind = { |
| 105 | + Separator: -1, |
| 106 | + Default: 0, |
| 107 | +}; |
| 108 | + |
| 109 | +export = { |
| 110 | + ThemeColor, |
| 111 | + CodeLens, |
| 112 | + languages, |
| 113 | + StatusBarAlignment, |
| 114 | + window, |
| 115 | + workspace, |
| 116 | + OverviewRulerLane, |
| 117 | + Uri, |
| 118 | + Range, |
| 119 | + Location, |
| 120 | + Position, |
| 121 | + Diagnostic, |
| 122 | + ThemeIcon, |
| 123 | + DiagnosticSeverity, |
| 124 | + ConfigurationTarget, |
| 125 | + debug, |
| 126 | + commands, |
| 127 | + QuickInputButtons, |
| 128 | + tests, |
| 129 | + TestRunProfileKind, |
| 130 | + EventEmitter, |
| 131 | + TestMessage, |
| 132 | + TestRunRequest, |
| 133 | + ViewColumn, |
| 134 | + QuickPickItemKind, |
| 135 | +}; |
0 commit comments