blob: 9997ea94941fdfca5a2a34d204c99ef3df49ddce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { shallowMount } from '@vue/test-utils';
import ExternalUrlComp from '~/environments/components/environment_external_url.vue';
describe('External URL Component', () => {
let wrapper;
const externalUrl = 'https://gitlab.com';
beforeEach(() => {
wrapper = shallowMount(ExternalUrlComp, { propsData: { externalUrl } });
});
it('should link to the provided externalUrl prop', () => {
expect(wrapper.attributes('href')).toEqual(externalUrl);
expect(wrapper.find('a').exists()).toBe(true);
});
});
|