Commit fd874969 authored by Winnie Hellmann's avatar Winnie Hellmann

Remove localVue from discussion_jump_to_next_button_spec.js

parent dc9a6765
import jumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue'; import jumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
const localVue = createLocalVue();
describe('jumpToNextDiscussionButton', () => { describe('jumpToNextDiscussionButton', () => {
let wrapper; let wrapper;
beforeEach(() => { beforeEach(() => {
wrapper = shallowMount(jumpToNextDiscussionButton, { wrapper = shallowMount(jumpToNextDiscussionButton, {
localVue,
sync: false, sync: false,
}); });
}); });
...@@ -17,17 +14,13 @@ describe('jumpToNextDiscussionButton', () => { ...@@ -17,17 +14,13 @@ describe('jumpToNextDiscussionButton', () => {
wrapper.destroy(); wrapper.destroy();
}); });
it('emits onClick event on button click', done => { it('emits onClick event on button click', () => {
const button = wrapper.find({ ref: 'button' }); const button = wrapper.find({ ref: 'button' });
button.trigger('click'); button.trigger('click');
localVue.nextTick(() => { expect(wrapper.emitted()).toEqual({
expect(wrapper.emitted()).toEqual({ onClick: [[]],
onClick: [[]],
});
done();
}); });
}); });
}); });
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