mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
Update HeaderItem unit test
This commit is contained in:
parent
40c82153eb
commit
e75280fa9b
23
tests/unit/HeaderItem.spec.ts
Normal file
23
tests/unit/HeaderItem.spec.ts
Normal file
@ -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');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user