Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Jan 24, 2024
1 parent 0654f65 commit 109b135
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ describe('getPieceActionMenus', () => {
});

describe('unReceive action', () => {
it('should `onStatusChange` be called with `Expected` status value', () => {
const onStatusChange = jest.fn();
const result = getPieceActionMenu({ status: received, onStatusChange });
it('should `onUnreceivePiece` be called with `Expected` status value', () => {
const onUnreceivePiece = jest.fn();
const result = getPieceActionMenu({ status: received, onUnreceivePiece });
const receiveButton = result.find(i => i.props['data-testid'] === 'unReceive-piece-button');

receiveButton.props.onClick();

expect(onStatusChange).toHaveBeenCalledWith(PIECE_STATUS.expected);
expect(onUnreceivePiece).toHaveBeenCalledWith();
});
});

Expand Down

0 comments on commit 109b135

Please sign in to comment.