debian-mirror-gitlab/spec/frontend/notes/components/note_actions/reply_button_spec.js
2021-03-11 19:13:27 +05:30

22 lines
513 B
JavaScript

import { GlButton } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import ReplyButton from '~/notes/components/note_actions/reply_button.vue';
describe('ReplyButton', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(ReplyButton);
});
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
it('emits startReplying on click', () => {
wrapper.find(GlButton).vm.$emit('click');
expect(wrapper.emitted('startReplying')).toEqual([[]]);
});
});