summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/components/commit_sidebar/empty_state_spec.js
blob: 4a6aafe42ae57a673d0cf4cb22a1c94c752e63c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { shallowMount } from '@vue/test-utils';
import EmptyState from '~/ide/components/commit_sidebar/empty_state.vue';
import { createStore } from '~/ide/stores';

describe('IDE commit panel EmptyState component', () => {
  let wrapper;

  beforeEach(() => {
    const store = createStore();
    store.state.noChangesStateSvgPath = 'no-changes';
    wrapper = shallowMount(EmptyState, { store });
  });

  it('renders no changes text when last commit message is empty', () => {
    expect(wrapper.find('h4').text()).toBe('No changes');
  });
});