From e75280fa9b24dc4f30a7e702aa6506feef2a8899 Mon Sep 17 00:00:00 2001 From: Eugene Serb <46799701+eugene-serb@users.noreply.github.com> Date: Sun, 18 Dec 2022 12:44:36 +0300 Subject: [PATCH] Update HeaderItem unit test --- tests/unit/HeaderItem.spec.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/unit/HeaderItem.spec.ts diff --git a/tests/unit/HeaderItem.spec.ts b/tests/unit/HeaderItem.spec.ts new file mode 100644 index 0000000..7832235 --- /dev/null +++ b/tests/unit/HeaderItem.spec.ts @@ -0,0 +1,23 @@ +import { shallowMount } from '@vue/test-utils'; +import { createRouter, createWebHistory } from 'vue-router' +import routes from '@/router/assets/routes' +import HeaderItem from '@/components/HeaderItem.vue'; + +const router = createRouter({ + history: createWebHistory(), + routes: routes, +}) + +describe('HeaderItem.vue', () => { + it('renders slots when passed', () => { + const wrapper = shallowMount( + HeaderItem, + { + global: { + plugins: [router] + } + } + ); + expect(wrapper.html()).toContain('Wavelovers'); + }); +});