blob: a1b951b468319f52da105ddad0fb87a0f05cee16 (
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
|
import { mount, createLocalVue } from '@vue/test-utils';
import PageSection from '@/components/Global/PageSection';
const localVue = createLocalVue();
describe('PageSection.vue', () => {
const wrapper = mount(PageSection, {
localVue,
propsData: {
sectionTitle: 'PageSection test title',
},
mocks: {
$t: (key) => key,
},
});
it('should exist', () => {
expect(wrapper.exists()).toBe(true);
});
it('should render h2 element', () => {
expect(wrapper.find('h2').exists()).toBe(true);
});
it('should render correctly', () => {
expect(wrapper.element).toMatchSnapshot();
});
});
|