diff options
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r-- | spec/frontend/diffs/components/diff_file_header_spec.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/frontend/diffs/components/diff_file_header_spec.js b/spec/frontend/diffs/components/diff_file_header_spec.js index d2f537950d1..4f6e771aec8 100644 --- a/spec/frontend/diffs/components/diff_file_header_spec.js +++ b/spec/frontend/diffs/components/diff_file_header_spec.js @@ -126,7 +126,9 @@ describe('DiffFileHeader component', () => { it('when collapseIcon is clicked emits toggleFile', () => { createComponent({ collapsible: true }); findCollapseIcon().vm.$emit('click', new Event('click')); - expect(wrapper.emitted().toggleFile).toBeDefined(); + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().toggleFile).toBeDefined(); + }); }); it('when other element in header is clicked does not emits toggleFile', () => { @@ -200,7 +202,9 @@ describe('DiffFileHeader component', () => { addMergeRequestButtons: true, }); wrapper.find(EditButton).vm.$emit('showForkMessage'); - expect(wrapper.emitted().showForkMessage).toBeDefined(); + return wrapper.vm.$nextTick().then(() => { + expect(wrapper.emitted().showForkMessage).toBeDefined(); + }); }); it('for mode_changed file mode displays mode changes', () => { |