summaryrefslogtreecommitdiff
path: root/spec/frontend_integration/ide/helpers/start.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/frontend_integration/ide/helpers/start.js
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
downloadgitlab-ce-13.10.0-rc40.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/frontend_integration/ide/helpers/start.js')
-rw-r--r--spec/frontend_integration/ide/helpers/start.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/frontend_integration/ide/helpers/start.js b/spec/frontend_integration/ide/helpers/start.js
index 173a9610c84..cc6abd9e01f 100644
--- a/spec/frontend_integration/ide/helpers/start.js
+++ b/spec/frontend_integration/ide/helpers/start.js
@@ -1,6 +1,7 @@
+/* global monaco */
+
import { TEST_HOST } from 'helpers/test_constants';
import { initIde } from '~/ide';
-import Editor from '~/ide/lib/editor';
import extendStore from '~/ide/stores/extend';
import { IDE_DATASET } from './mock_data';
@@ -18,13 +19,7 @@ export default (container, { isRepoEmpty = false, path = '', mrId = '' } = {}) =
const vm = initIde(el, { extendStore });
// We need to dispose of editor Singleton things or tests will bump into eachother
- vm.$on('destroy', () => {
- if (Editor.editorInstance) {
- Editor.editorInstance.modelManager.dispose();
- Editor.editorInstance.dispose();
- Editor.editorInstance = null;
- }
- });
+ vm.$on('destroy', () => monaco.editor.getModels().forEach((model) => model.dispose()));
return vm;
};