Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Dec 20, 2024
1 parent cfe075d commit c2bfc24
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ui/components/app/assets/asset-list/asset-list.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ jest.mock('../../../../store/actions', () => {
})),
tokenBalancesStartPolling: jest.fn().mockResolvedValue('pollingToken'),
tokenBalancesStopPollingByPollingToken: jest.fn(),
addImportedTokens: jest.fn(),
};
});

// Mock the dispatch function
const mockDispatch = jest.fn();

jest.mock('react-redux', () => {
const actual = jest.requireActual('react-redux');
return {
...actual,
useDispatch: () => mockDispatch,
};
});

Expand Down

0 comments on commit c2bfc24

Please sign in to comment.