Remove localVue from discussion_jump_to_next_button_spec.js

This commit is contained in:
Winnie Hellmann 2019-02-20 21:27:57 +01:00
parent dc9a67652d
commit fd87496971

View file

@ -1,14 +1,11 @@
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', () => {
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();
});
}); });
}); });