gitlab-org--gitlab-foss/spec/frontend/diffs/components/commit_widget_spec.js

19 lines
500 B
JavaScript

import { shallowMount } from '@vue/test-utils';
import CommitWidget from '~/diffs/components/commit_widget.vue';
import CommitItem from '~/diffs/components/commit_item.vue';
describe('diffs/components/commit_widget', () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(CommitWidget, {
propsData: { commit: {} },
});
});
it('renders commit item', () => {
const commitElement = wrapper.find(CommitItem);
expect(commitElement.exists()).toBe(true);
});
});