blob: e24de832d6d3d39ba2b6b840f0b2388fa09789a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { shallowMount } from '@vue/test-utils';
import BranchSwitcher from '~/pipeline_editor/components/file_nav/branch_switcher.vue';
import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
describe('Pipeline editor file nav', () => {
let wrapper;
const createComponent = ({ provide = {} } = {}) => {
wrapper = shallowMount(PipelineEditorFileNav, {
provide: {
...provide,
},
});
};
const findBranchSwitcher = () => wrapper.findComponent(BranchSwitcher);
afterEach(() => {
wrapper.destroy();
});
describe('template', () => {
beforeEach(() => {
createComponent();
});
it('renders the branch switcher', () => {
expect(findBranchSwitcher().exists()).toBe(true);
});
});
});
|