From fd8749697115a6d5188ab55cb173bfe4a0246a2d Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Wed, 20 Feb 2019 21:27:57 +0100 Subject: Remove localVue from discussion_jump_to_next_button_spec.js --- .../components/discussion_jump_to_next_button_spec.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'spec/frontend') diff --git a/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js b/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js index c41b29fa788..2a4df126ff9 100644 --- a/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js +++ b/spec/frontend/notes/components/discussion_jump_to_next_button_spec.js @@ -1,14 +1,11 @@ import jumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue'; -import { shallowMount, createLocalVue } from '@vue/test-utils'; - -const localVue = createLocalVue(); +import { shallowMount } from '@vue/test-utils'; describe('jumpToNextDiscussionButton', () => { let wrapper; beforeEach(() => { wrapper = shallowMount(jumpToNextDiscussionButton, { - localVue, sync: false, }); }); @@ -17,17 +14,13 @@ describe('jumpToNextDiscussionButton', () => { wrapper.destroy(); }); - it('emits onClick event on button click', done => { + it('emits onClick event on button click', () => { const button = wrapper.find({ ref: 'button' }); button.trigger('click'); - localVue.nextTick(() => { - expect(wrapper.emitted()).toEqual({ - onClick: [[]], - }); - - done(); + expect(wrapper.emitted()).toEqual({ + onClick: [[]], }); }); }); -- cgit v1.2.3