blob: 933212ca14feae8344760bcd3ff1f2b8ffd3779d [file] [log] [blame]
Ed Tanous7d6b44c2024-03-23 14:56:34 -07001import { mount } from '@vue/test-utils';
Sukanya Pandeye6693042020-12-02 19:30:45 +05302import PageTitle from '@/components/Global/PageTitle';
3
Sukanya Pandeye6693042020-12-02 19:30:45 +05304describe('PageTitle.vue', () => {
5 const wrapper = mount(PageTitle, {
Sukanya Pandeye6693042020-12-02 19:30:45 +05306 propsData: {
7 description: 'A page title test description',
8 },
9 mocks: {
10 $t: (key) => key,
11 $route: {
12 meta: {
13 title: 'Page Title',
14 },
15 },
16 },
17 });
18 it('should exist', () => {
19 expect(wrapper.exists()).toBe(true);
20 });
21 it('should render h1 element', () => {
22 expect(wrapper.find('h1').exists()).toBe(true);
23 });
24 it('should render p element', () => {
25 expect(wrapper.find('p').exists()).toBe(true);
26 });
27 it('should render correctly', () => {
28 expect(wrapper.element).toMatchSnapshot();
29 });
30});