Commit bbd52bc7 authored by Phil Hughes's avatar Phil Hughes

fixed editor component spec

parent df47b6b0
......@@ -90,7 +90,7 @@ export default {
});
},
setupEditor() {
if (!this.activeFile) return;
if (!this.activeFile || !this.editor.instance) return;
this.model = this.editor.createModel(this.activeFile);
......
......@@ -63,7 +63,7 @@ describe('RepoEditor', () => {
describe('createEditorInstance', () => {
it('calls createInstance when viewer is editor', (done) => {
spyOn(vm.editor, 'createInstance').and.callThrough();
spyOn(vm.editor, 'createInstance');
vm.createEditorInstance();
......@@ -77,7 +77,7 @@ describe('RepoEditor', () => {
it('calls createDiffInstance when viewer is diff', (done) => {
vm.$store.state.viewer = 'diff';
spyOn(vm.editor, 'createDiffInstance').and.callThrough();
spyOn(vm.editor, 'createDiffInstance');
vm.createEditorInstance();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment