Skip to content

Commit

Permalink
updated TransactionToast test
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi committed Nov 20, 2024
1 parent 3ed8727 commit 2606cbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transaction/components/TransactionToast.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ describe('TransactionToast', () => {
});

it('displays error message when present', () => {
const setIsToastVisible = vi.fn();
const mockErrorMessage = 'Transaction failed';
(useTransactionContext as Mock).mockReturnValue({
isLoading: false,
isToastVisible: true,
transactionHash: '',
errorMessage: mockErrorMessage,
setIsToastVisible,
});

render(<TransactionToast>Error occurred</TransactionToast>);
Expand Down

0 comments on commit 2606cbd

Please sign in to comment.