import { createMemoryHistory, createRouter } from 'vue-router'; import { useAccessStore } from '@easyflow/stores'; import { createPinia, setActivePinia } from 'pinia'; import { beforeEach, describe, expect, it } from 'vitest'; import { createRouterGuard } from '../guard'; describe('public route guard', () => { beforeEach(() => { setActivePinia(createPinia()); }); it('bypasses stale login state for an anonymous workflow share', async () => { const accessStore = useAccessStore(); accessStore.setAccessToken('stale-token'); const router = createRouter({ history: createMemoryHistory(), routes: [ { component: { template: '