diff --git a/src/stores/subgraphNavigationStore.test.ts b/src/stores/subgraphNavigationStore.test.ts index d7753bb0c8..ba1a0b28de 100644 --- a/src/stores/subgraphNavigationStore.test.ts +++ b/src/stores/subgraphNavigationStore.test.ts @@ -1,6 +1,6 @@ import { createPinia, setActivePinia } from 'pinia' import { beforeEach, describe, expect, it, vi } from 'vitest' -import { nextTick } from 'vue' +import { nextTick, ref } from 'vue' import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore' import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore' @@ -44,6 +44,10 @@ vi.mock('@/utils/graphTraversalUtil', () => ({ findSubgraphPathById: vi.fn() })) +vi.mock('@vueuse/router', () => ({ + useRouteHash: () => ref('') +})) + describe('useSubgraphNavigationStore', () => { beforeEach(() => { setActivePinia(createPinia()) diff --git a/src/stores/subgraphNavigationStore.viewport.test.ts b/src/stores/subgraphNavigationStore.viewport.test.ts index 6dbf85a6b9..672af44900 100644 --- a/src/stores/subgraphNavigationStore.viewport.test.ts +++ b/src/stores/subgraphNavigationStore.viewport.test.ts @@ -1,6 +1,6 @@ import { createPinia, setActivePinia } from 'pinia' import { beforeEach, describe, expect, it, vi } from 'vitest' -import { nextTick } from 'vue' +import { nextTick, ref } from 'vue' import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore' import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore' @@ -41,6 +41,10 @@ vi.mock('@/renderer/core/canvas/canvasStore', () => ({ }) })) +vi.mock('@vueuse/router', () => ({ + useRouteHash: () => ref('') +})) + // Get reference to mock canvas const mockCanvas = app.canvas as any