Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/blob/utils_spec.js')
-rw-r--r--spec/frontend/blob/utils_spec.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/frontend/blob/utils_spec.js b/spec/frontend/blob/utils_spec.js
index 9f597aa016e..24f70acb093 100644
--- a/spec/frontend/blob/utils_spec.js
+++ b/spec/frontend/blob/utils_spec.js
@@ -1,46 +1,6 @@
import * as utils from '~/blob/utils';
-import Editor from '~/editor/source_editor';
-
-jest.mock('~/editor/source_editor');
describe('Blob utilities', () => {
- describe('initSourceEditor', () => {
- let editorEl;
- const blobPath = 'foo.txt';
- const blobContent = 'Foo bar';
- const blobGlobalId = 'snippet_777';
-
- beforeEach(() => {
- editorEl = document.createElement('div');
- });
-
- describe('Monaco editor', () => {
- it('initializes the Source Editor', () => {
- utils.initSourceEditor({ el: editorEl });
- expect(Editor).toHaveBeenCalledWith({
- scrollbar: {
- alwaysConsumeMouseWheel: false,
- },
- });
- });
-
- it.each([[{}], [{ blobPath, blobContent, blobGlobalId }]])(
- 'creates the instance with the passed parameters %s',
- (extraParams) => {
- const params = {
- el: editorEl,
- ...extraParams,
- };
-
- expect(Editor.prototype.createInstance).not.toHaveBeenCalled();
-
- utils.initSourceEditor(params);
-
- expect(Editor.prototype.createInstance).toHaveBeenCalledWith(params);
- },
- );
- });
- });
describe('getPageParamValue', () => {
it('returns empty string if no perPage parameter is provided', () => {
const pageParamValue = utils.getPageParamValue(5);