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