summaryrefslogtreecommitdiff
path: root/spec/frontend_integration/ide/helpers/start.js
diff options
context:
space:
mode:
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;
};