diff --git a/src/components/graph/selectionToolbox/BypassButton.test.ts b/src/components/graph/selectionToolbox/BypassButton.test.ts index b77925575..f9670226a 100644 --- a/src/components/graph/selectionToolbox/BypassButton.test.ts +++ b/src/components/graph/selectionToolbox/BypassButton.test.ts @@ -35,9 +35,18 @@ describe('BypassButton', () => { } }) + // Mock interfaces + interface MockCommandStore { + execute: ReturnType + } + + interface MockSelectionState { + hasAnySelection: { value: boolean } + } + // Mock instances - let mockCommandStore: any - let mockSelectionState: any + let mockCommandStore: MockCommandStore + let mockSelectionState: MockSelectionState beforeEach(() => { vi.clearAllMocks() @@ -46,13 +55,17 @@ describe('BypassButton', () => { mockCommandStore = { execute: vi.fn().mockResolvedValue(undefined) } - vi.mocked(useCommandStore).mockReturnValue(mockCommandStore) + vi.mocked(useCommandStore).mockReturnValue( + mockCommandStore as unknown as ReturnType + ) // Setup mock selection state mockSelectionState = { hasAnySelection: ref(true) } - vi.mocked(useSelectionState).mockReturnValue(mockSelectionState) + vi.mocked(useSelectionState).mockReturnValue( + mockSelectionState as unknown as ReturnType + ) }) const mountComponent = () => {