mirror of
https://github.com/directus/directus.git
synced 2026-02-11 12:55:08 -05:00
38 lines
662 B
TypeScript
38 lines
662 B
TypeScript
import { test, expect } from 'vitest';
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import VBreadcrumb from './v-breadcrumb.vue';
|
|
import { GlobalMountOptions } from '@vue/test-utils/dist/types';
|
|
|
|
const global: GlobalMountOptions = {
|
|
stubs: ['v-icon', 'router-link'],
|
|
};
|
|
|
|
test('Mount component', () => {
|
|
expect(VBreadcrumb).toBeTruthy();
|
|
|
|
const wrapper = mount(VBreadcrumb, {
|
|
props: {
|
|
items: [
|
|
{
|
|
to: 'hi',
|
|
name: 'Hi',
|
|
},
|
|
{
|
|
to: 'wow',
|
|
name: 'Wow',
|
|
icon: 'close',
|
|
},
|
|
{
|
|
to: 'disabled',
|
|
name: 'Disabled',
|
|
disabled: true,
|
|
},
|
|
],
|
|
},
|
|
global,
|
|
});
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|