blob: d1a81dd163916d1347ce3ec569a1b5b8cf064339 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { shallowMount } from '@vue/test-utils';
import SuccessMessage from '~/ide/components/commit_sidebar/success_message.vue';
import { createStore } from '~/ide/stores';
describe('IDE commit panel successful commit state', () => {
let wrapper;
beforeEach(() => {
const store = createStore();
store.state.committedStateSvgPath = 'committed-state';
store.state.lastCommitMsg = 'testing commit message';
wrapper = shallowMount(SuccessMessage, { store });
});
it('renders last commit message when it exists', () => {
expect(wrapper.text()).toContain('testing commit message');
});
});
|