diff options
author | Phil Hughes <me@iamphill.com> | 2017-11-28 16:51:37 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-28 16:51:37 +0000 |
commit | d22bb0397b04f2870c6fbbeb2912ef6627e4afb7 (patch) | |
tree | 4ac97a97232823b10029e59b4ff124299978a062 /spec | |
parent | 5fceb8d1ecb8b3b682ad0cc73a26b99068864f3f (diff) | |
download | gitlab-ce-d22bb0397b04f2870c6fbbeb2912ef6627e4afb7.tar.gz |
fixed failing specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/repo/components/repo_editor_spec.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/javascripts/repo/components/repo_editor_spec.js b/spec/javascripts/repo/components/repo_editor_spec.js index 979d2185076..81158cad639 100644 --- a/spec/javascripts/repo/components/repo_editor_spec.js +++ b/spec/javascripts/repo/components/repo_editor_spec.js @@ -1,12 +1,13 @@ import Vue from 'vue'; import store from '~/repo/stores'; import repoEditor from '~/repo/components/repo_editor.vue'; +import monacoLoader from '~/repo/monaco_loader'; import { file, resetStore } from '../helpers'; describe('RepoEditor', () => { let vm; - beforeEach(() => { + beforeEach((done) => { const f = file(); const RepoEditor = Vue.extend(repoEditor); @@ -21,6 +22,10 @@ describe('RepoEditor', () => { vm.monaco = true; vm.$mount(); + + monacoLoader(['vs/editor/editor.main'], () => { + setTimeout(done, 0); + }); }); afterEach(() => { @@ -32,7 +37,6 @@ describe('RepoEditor', () => { it('renders an ide container', (done) => { Vue.nextTick(() => { expect(vm.shouldHideEditor).toBeFalsy(); - expect(vm.$el.textContent.trim()).toBe(''); done(); }); @@ -50,7 +54,7 @@ describe('RepoEditor', () => { }); it('shows activeFile html', () => { - expect(vm.$el.textContent.trim()).toBe('testing'); + expect(vm.$el.textContent).toContain('testing'); }); }); }); |