import { describe, it, expect } from 'vitest' import { mount } from '@vue/test-utils' import { createMemoryHistory, createRouter } from 'vue-router' import App from '../App.vue' const mockRouter = createRouter({ history: createMemoryHistory(), routes: [{ path: '/', name: 'Home', component: { template: '
' } }], }) describe('App', () => { it('mounts renders properly', () => { const wrapper = mount(App, { global: { plugins: [mockRouter], stubs: { 'router-view': { template: '
You did it!
', }, }, }, }) expect(wrapper.text()).toContain('You did it!') }) })