import { describe, expect, it } from 'vitest' import router from '@/router' describe('router', () => { it('路由表包含查看面与管理面三页', () => { const paths = router.getRoutes().map((r) => r.path) for (const p of ['/usage-log', '/manage/api-keys', '/manage/purchases', '/manage/qpu']) { expect(paths).toContain(p) } }) it( '根路径重定向到 /usage-log(真实导航;首次含懒加载组件转换,放宽超时)', async () => { await router.push('/') expect(router.currentRoute.value.path).toBe('/usage-log') }, 20_000, ) })