summaryrefslogtreecommitdiff
path: root/spec/frontend/diffs/components/commit_widget_spec.js
blob: f650ead6f8305f8e61cbb460a70a2df1b200d5af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { shallowMount } from '@vue/test-utils';
import CommitItem from '~/diffs/components/commit_item.vue';
import CommitWidget from '~/diffs/components/commit_widget.vue';

describe('diffs/components/commit_widget', () => {
  let wrapper;

  beforeEach(() => {
    wrapper = shallowMount(CommitWidget, {
      propsData: { commit: {} },
    });
  });

  it('renders commit item', () => {
    const commitElement = wrapper.findComponent(CommitItem);

    expect(commitElement.exists()).toBe(true);
  });
});