wavelovers/tests/unit/HeaderItem.spec.ts
2022-12-18 12:44:36 +03:00

24 lines
566 B
TypeScript

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');
});
});