diff --git a/src/App.spec.ts b/src/App.spec.ts index 0faf06a..6624e32 100644 --- a/src/App.spec.ts +++ b/src/App.spec.ts @@ -6,7 +6,10 @@ * https://pinia.vuejs.org/zh/cookbook/testing.html#unit-testing-components */ +import { mount } from '@vue/test-utils'; import { describe, expect, it } from 'vitest'; +import { createMemoryHistory, createRouter } from 'vue-router'; +import App from './App.vue'; const router = createRouter({ history: createMemoryHistory(), @@ -20,10 +23,6 @@ const router = createRouter({ ], }); -import { mount } from '@vue/test-utils'; -import { createMemoryHistory, createRouter } from 'vue-router'; -import App from './App.vue'; - describe('App', () => { it('renders RouterView', async () => { router.push('/'); diff --git a/src/App.vue b/src/App.vue index 09b9459..6809aec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,8 @@