Skip to content

Commit

Permalink
Update graph.logic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaCWebDeveloper committed Jun 11, 2024
1 parent be22edb commit 9069880
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ describe('graph.logic', () => {
beforeEach(() => {
// Reset mocks before each test
vi.clearAllMocks();
mockNodeLogic = {} as NodeLogic;
mockNodeLogic = {
selectSubflowEntitiesAsPaletteNodes: vi.fn(
() => ({})
) as unknown as NodeLogic['selectSubflowEntitiesAsPaletteNodes'],
selectInOutPaletteNodeEntities: vi.fn(
() => ({})
) as unknown as NodeLogic['selectInOutPaletteNodeEntities'],
} as NodeLogic;
graphLogic = new GraphLogic(mockNodeLogic);
});

Expand Down Expand Up @@ -410,9 +417,6 @@ describe('graph.logic', () => {
mockedSelectPaletteNodeEntities.mockImplementation(() => ({
node2: mockNodeEntity,
}));
mockNodeLogic.selectSubflowEntitiesAsPaletteNodes = vi.fn(
() => ({})
) as unknown as NodeLogic['selectSubflowEntitiesAsPaletteNodes'];
mockedSelectFlowEntityById.mockImplementation(() => mockFlow);
mockedSelectFlowNodesByFlowId.mockImplementation(() => mockNodes);

Expand Down

0 comments on commit 9069880

Please sign in to comment.