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 { 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();
});
});
});