1import { mount, createLocalVue } from '@vue/test-utils'; 2import PageSection from '@/components/Global/PageSection'; 3 4const localVue = createLocalVue(); 5 6describe('PageSection.vue', () => { 7 const wrapper = mount(PageSection, { 8 localVue, 9 propsData: { 10 sectionTitle: 'PageSection test title', 11 }, 12 mocks: { 13 $t: (key) => key, 14 }, 15 }); 16 it('should exist', () => { 17 expect(wrapper.exists()).toBe(true); 18 }); 19 it('should render h2 element', () => { 20 expect(wrapper.find('h2').exists()).toBe(true); 21 }); 22 it('should render correctly', () => { 23 expect(wrapper.element).toMatchSnapshot(); 24 }); 25}); 26