blob: 3739829c759ca7ddfd65c89caa7cd107519a7e47 (
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
|
import { shallowMount } from '@vue/test-utils';
import DirectoryDownloadLinks from '~/repository/components/directory_download_links.vue';
let vm;
function factory(currentPath) {
vm = shallowMount(DirectoryDownloadLinks, {
propsData: {
currentPath,
links: [
{ text: 'zip', path: 'http://test.com/' },
{ text: 'tar', path: 'http://test.com/' },
],
},
});
}
describe('Repository directory download links component', () => {
it.each`
path
${'app'}
${'app/assets'}
`('renders downloads links for path $path', ({ path }) => {
factory(path);
expect(vm.element).toMatchSnapshot();
});
});
|