Remove localVue from discussion_jump_to_next_button_spec.js
This commit is contained in:
parent
dc9a67652d
commit
fd87496971
1 changed files with 4 additions and 11 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue