blob: 885a80f73b5002bbe89c89dd96c2bc119c5583e2 (
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
|
import { shallowMount } from '@vue/test-utils';
import { GlTruncate } from '@gitlab/ui';
import FileRowHeader from '~/vue_shared/components/file_row_header.vue';
describe('File row header component', () => {
let wrapper;
function createComponent(path) {
wrapper = shallowMount(FileRowHeader, {
propsData: {
path,
},
});
}
it('renders file path', () => {
const path = 'app/assets';
createComponent(path);
const truncate = wrapper.findComponent(GlTruncate);
expect(truncate.exists()).toBe(true);
expect(truncate.props('text')).toBe(path);
});
});
|