/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * NOTE: we have tried different ways to mock `monaco-editor`. But those ways often involve * trying to load `monaco-editor` from `node_modules` and that takes a long time, so we'd better just mock * it completely like in this file. * See https://gitlab.com/gitlab-org/gitlab/-/issues/119194 * See https://stackoverflow.com/questions/57731857/cannot-test-jest-with-monaco-editor-unexpected-token */ export declare enum MockedMonacoEditorKeyCode { F1 = 59, F8 = 66, F9 = 67, F10 = 68 } export declare enum MockedMonacoEditorMarkerSeverity { Hint = 1, Info = 2, Warning = 4, Error = 8 } export declare enum MockedMonacoEditorEndOfLinePreference { LF = 1 } export declare const MockedMonacoEditorModel: { dispose: import("@jest/globals").jest.Mock; updateOptions: import("@jest/globals").jest.Mock; getValue: import("@jest/globals").jest.Mock; getLineCount: import("@jest/globals").jest.Mock; getLineMaxColumn: import("@jest/globals").jest.Mock; getValueInRange: import("@jest/globals").jest.Mock; setValue: import("@jest/globals").jest.Mock; pushStackElement: import("@jest/globals").jest.Mock; pushEditOperations: import("@jest/globals").jest.Mock; findMatches: import("@jest/globals").jest.Mock; }; export declare const MockedMonacoEditorInstance: { focus: import("@jest/globals").jest.Mock; dispose: import("@jest/globals").jest.Mock; addCommand: import("@jest/globals").jest.Mock; getValue: import("@jest/globals").jest.Mock; getPosition: import("@jest/globals").jest.Mock; getRawOptions: import("@jest/globals").jest.Mock; getModel: () => typeof MockedMonacoEditorModel; hasTextFocus: import("@jest/globals").jest.Mock; updateOptions: import("@jest/globals").jest.Mock; setValue: import("@jest/globals").jest.Mock; revealPosition: import("@jest/globals").jest.Mock; setModel: import("@jest/globals").jest.Mock; setPosition: import("@jest/globals").jest.Mock; onKeyDown: import("@jest/globals").jest.Mock; revealPositionInCenter: import("@jest/globals").jest.Mock; saveViewState: import("@jest/globals").jest.Mock; createDecorationsCollection: import("@jest/globals").jest.Mock; onDidChangeModelContent: import("@jest/globals").jest.Mock; onDidChangeCursorPosition: import("@jest/globals").jest.Mock; onDidFocusEditorText: import("@jest/globals").jest.Mock; onDidBlurEditorText: import("@jest/globals").jest.Mock; onDidFocusEditorWidget: import("@jest/globals").jest.Mock; }; export declare const MockedMonacoEditorAPI: { create: () => typeof MockedMonacoEditorInstance; focus: import("@jest/globals").jest.Mock; createModel: import("@jest/globals").jest.Mock; createDiffEditor: () => { getOriginalEditor: () => typeof MockedMonacoEditorInstance; getModifiedEditor: () => typeof MockedMonacoEditorInstance; }; setModelMarkers: import("@jest/globals").jest.Mock; setModelLanguage: import("@jest/globals").jest.Mock; defineTheme: import("@jest/globals").jest.Mock; EndOfLinePreference: typeof MockedMonacoEditorEndOfLinePreference; removeAllMarkers: import("@jest/globals").jest.Mock; remeasureFonts: import("@jest/globals").jest.Mock; }; export declare enum MockedMonacoLanguageCompletionItemKind { Keyword = 17, Snippet = 27 } export declare enum MockedMonacoLanguageCompletionItemInsertTextRule { InsertAsSnippet = 4 } export declare const MockedMonacoEditorLanguagesAPI: { register: import("@jest/globals").jest.Mock; setLanguageConfiguration: import("@jest/globals").jest.Mock; setMonarchTokensProvider: import("@jest/globals").jest.Mock; registerCodeLensProvider: import("@jest/globals").jest.Mock; registerHoverProvider: import("@jest/globals").jest.Mock; registerCompletionItemProvider: import("@jest/globals").jest.Mock; CompletionItemKind: typeof MockedMonacoLanguageCompletionItemKind; CompletionItemInsertTextRule: typeof MockedMonacoLanguageCompletionItemKind; }; //# sourceMappingURL=MonacoEditorMockUtils.d.ts.map