debian-mirror-gitlab/spec/frontend/packages/details/components/file_sha_spec.js
2021-09-04 01:27:46 +05:30

33 lines
724 B
JavaScript

import { shallowMount } from '@vue/test-utils';
import FileSha from '~/packages/details/components/file_sha.vue';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import DetailsRow from '~/vue_shared/components/registry/details_row.vue';
describe('FileSha', () => {
let wrapper;
const defaultProps = { sha: 'foo', title: 'bar' };
function createComponent() {
wrapper = shallowMount(FileSha, {
propsData: {
...defaultProps,
},
stubs: {
ClipboardButton,
DetailsRow,
},
});
}
afterEach(() => {
wrapper.destroy();
});
it('renders', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
});