Browse Source

fix(tests): add missing useConnection mock to 3 test files

AudioInputNode, EaseCurveNode, and VideoStitchNode tests used manual
@xyflow/react mocks that didn't include useConnection, which is now
called by the useShowHandleLabels hook. Add the mock to fix all 40 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 3 months ago
parent
commit
30377cb9c2
  1. 1
      src/components/__tests__/AudioInputNode.test.tsx
  2. 1
      src/components/__tests__/EaseCurveNode.test.tsx
  3. 1
      src/components/__tests__/VideoStitchNode.test.tsx

1
src/components/__tests__/AudioInputNode.test.tsx

@ -39,6 +39,7 @@ vi.mock("@xyflow/react", () => {
setNodes: () => {},
screenToFlowPosition: (pos: unknown) => pos,
}),
useConnection: (selector: (state: { inProgress: boolean }) => boolean) => selector({ inProgress: false }),
};
});

1
src/components/__tests__/EaseCurveNode.test.tsx

@ -40,6 +40,7 @@ vi.mock("@xyflow/react", () => {
setNodes: vi.fn(),
screenToFlowPosition: (pos: unknown) => pos,
}),
useConnection: (selector: (state: { inProgress: boolean }) => boolean) => selector({ inProgress: false }),
};
});

1
src/components/__tests__/VideoStitchNode.test.tsx

@ -42,6 +42,7 @@ vi.mock("@xyflow/react", () => {
setNodes: () => {},
screenToFlowPosition: (pos: unknown) => pos,
}),
useConnection: (selector: (state: { inProgress: boolean }) => boolean) => selector({ inProgress: false }),
};
});

Loading…
Cancel
Save