( setupFunction: () => RawBindings, )
| 66 | }; |
| 67 | |
| 68 | export const setupComponent = <Props, RawBindings>( |
| 69 | setupFunction: () => RawBindings, |
| 70 | ): ComponentPublicInstance<Props, RawBindings> => { |
| 71 | const app = createApp({ |
| 72 | setup: setupFunction, |
| 73 | template: '<div></div>', |
| 74 | }); |
| 75 | |
| 76 | app.use(createTestingPinia()); |
| 77 | app.use(mockRouter); |
| 78 | app.use(vuetify()); |
| 79 | app.use(i18n); |
| 80 | app.use(serviceManager); |
| 81 | app.use(navigation.withSections({ main: [] })); |
| 82 | |
| 83 | const container = document.createElement('div'); |
| 84 | |
| 85 | return app.mount(container) as ComponentPublicInstance<Props, RawBindings>; |
| 86 | }; |
| 87 | |
| 88 | export function createMockRef<T>(value: T): Ref<T> { |
| 89 | return { value } as Ref<T>; |
no test coverage detected