Add unit test cases for page container component
Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: Ia7895156d1a4551bd70f95cc0207bf72522fba0e
diff --git a/tests/unit/Global/PageContainer.spec.js b/tests/unit/Global/PageContainer.spec.js
new file mode 100644
index 0000000..78a3521
--- /dev/null
+++ b/tests/unit/Global/PageContainer.spec.js
@@ -0,0 +1,22 @@
+import { mount, createLocalVue } from '@vue/test-utils';
+import PageContainer from '@/components/Global/PageContainer';
+
+const localVue = createLocalVue();
+
+describe('PageContainer.vue', () => {
+ const wrapper = mount(PageContainer, {
+ localVue,
+ mocks: {
+ $t: (key) => key,
+ },
+ });
+ it('should exist', () => {
+ expect(wrapper.exists()).toBe(true);
+ });
+ it('should render main element', () => {
+ expect(wrapper.find('main').exists()).toBe(true);
+ });
+ it('should render correctly', () => {
+ expect(wrapper.element).toMatchSnapshot();
+ });
+});