summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-06-08 00:09:59 -0500
committerMike Greiling <mike@pixelcog.com>2018-06-08 00:09:59 -0500
commit4653820d37f89c2fabe74800ccce2d1f8420a7da (patch)
tree2004cd651575163764e60a7429fc0b73ba6e1107 /spec
parent204d78e7f312d880f7dc45e814bfa5a7a7da65df (diff)
downloadgitlab-ce-4653820d37f89c2fabe74800ccce2d1f8420a7da.tar.gz
refactor monaco-editor import and stop storing as class property within editor
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/ide/lib/editor_spec.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/javascripts/ide/lib/editor_spec.js b/spec/javascripts/ide/lib/editor_spec.js
index cf867d021e6..c1932284d53 100644
--- a/spec/javascripts/ide/lib/editor_spec.js
+++ b/spec/javascripts/ide/lib/editor_spec.js
@@ -1,3 +1,4 @@
+import { editor as monacoEditor } from 'monaco-editor';
import Editor from '~/ide/lib/editor';
import { file } from '../helpers';
@@ -32,11 +33,11 @@ describe('Multi-file editor library', () => {
describe('createInstance', () => {
it('creates editor instance', () => {
- spyOn(instance.monaco.editor, 'create').and.callThrough();
+ spyOn(monacoEditor, 'create').and.callThrough();
instance.createInstance(holder);
- expect(instance.monaco.editor.create).toHaveBeenCalled();
+ expect(monacoEditor.create).toHaveBeenCalled();
});
it('creates dirty diff controller', () => {
@@ -54,11 +55,11 @@ describe('Multi-file editor library', () => {
describe('createDiffInstance', () => {
it('creates editor instance', () => {
- spyOn(instance.monaco.editor, 'createDiffEditor').and.callThrough();
+ spyOn(monacoEditor, 'createDiffEditor').and.callThrough();
instance.createDiffInstance(holder);
- expect(instance.monaco.editor.createDiffEditor).toHaveBeenCalledWith(holder, {
+ expect(monacoEditor.createDiffEditor).toHaveBeenCalledWith(holder, {
model: null,
contextmenu: true,
minimap: {