Add unit testing for page title component

Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: I1fc54f54bd8e9a7d132eab0edaed94a4032143c8
diff --git a/tests/unit/Global/PageTitle.spec.js b/tests/unit/Global/PageTitle.spec.js
new file mode 100644
index 0000000..5cb2691
--- /dev/null
+++ b/tests/unit/Global/PageTitle.spec.js
@@ -0,0 +1,33 @@
+import { mount, createLocalVue } from '@vue/test-utils';
+import PageTitle from '@/components/Global/PageTitle';
+
+const localVue = createLocalVue();
+
+describe('PageTitle.vue', () => {
+  const wrapper = mount(PageTitle, {
+    localVue,
+    propsData: {
+      description: 'A page title test description',
+    },
+    mocks: {
+      $t: (key) => key,
+      $route: {
+        meta: {
+          title: 'Page Title',
+        },
+      },
+    },
+  });
+  it('should exist', () => {
+    expect(wrapper.exists()).toBe(true);
+  });
+  it('should render h1 element', () => {
+    expect(wrapper.find('h1').exists()).toBe(true);
+  });
+  it('should render p element', () => {
+    expect(wrapper.find('p').exists()).toBe(true);
+  });
+  it('should render correctly', () => {
+    expect(wrapper.element).toMatchSnapshot();
+  });
+});