blob: 2a4df126ff9c68421ccb83183569d9e83b8cb91c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import jumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue';
import { shallowMount } from '@vue/test-utils';
describe('jumpToNextDiscussionButton', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(jumpToNextDiscussionButton, {
sync: false,
});
});
afterEach(() => {
wrapper.destroy();
});
it('emits onClick event on button click', () => {
const button = wrapper.find({ ref: 'button' });
button.trigger('click');
expect(wrapper.emitted()).toEqual({
onClick: [[]],
});
});
});
|