Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jitendra Gundaniya <[email protected]>
  • Loading branch information
jitu5 committed Aug 16, 2024
1 parent ed97780 commit 8272a48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('createCallbackMiddleware', () => {
it('should call the callback with the correct node when action type is TOGGLE_NODE_CLICKED and node is found', () => {
const nodeClicked = '123';
const node = { id: nodeClicked, name: 'Node 123' };
const nodeClickAction = { type: 'TOGGLE_NODE_CLICKED', payload: node };
const action = { type: 'TOGGLE_NODE_CLICKED', nodeClicked };

store.getState.mockReturnValue({
Expand All @@ -28,7 +29,7 @@ describe('createCallbackMiddleware', () => {

middleware(action);

expect(callback).toHaveBeenCalledWith(node);
expect(callback).toHaveBeenCalledWith(nodeClickAction);
expect(next).toHaveBeenCalledWith(action);
});

Expand Down

0 comments on commit 8272a48

Please sign in to comment.