import { describe, it, expect } from 'vitest' import { mount } from '@vue/test-utils' import App from '@/App.vue' import AppHeader from '@/components/AppHeader.vue' import AppFooter from '@/components/AppFooter.vue' import router from '@/router' describe('App', () => { it('renders AppHeader and AppFooter', async () => { router.push('/') await router.isReady() const wrapper = mount(App, { global: { plugins: [router], }, }) expect(wrapper.findComponent(AppHeader).exists()).toBe(true) expect(wrapper.findComponent(AppFooter).exists()).toBe(true) }) it('renders RouterView with HomePage content', async () => { router.push('/') await router.isReady() const wrapper = mount(App, { global: { plugins: [router], }, }) expect(wrapper.text()).toContain('Skicka ett brev till en fordonsägare') }) })