Skip to content

Commit

Permalink
refactor: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-deriv committed Jul 4, 2023
1 parent 6ccbb79 commit 49e6286
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/hooks/src/__tests__/useWalletTransactions.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('useWalletsList', () => {
const mock = mockStore({
client: {
accounts: { CRW909900: { token: '12345' } },
currency: 'USD',
loginid: 'CRW909900',
},
});
Expand Down Expand Up @@ -106,6 +107,7 @@ describe('useWalletsList', () => {
action_type: 'deposit',
amount: 25,
balance_after: 25,
gradient_class: 'wallet-card__usd-bg',
transaction_id: 17494415481,
transaction_time: 1685942136,
account_category: 'wallet',
Expand All @@ -119,6 +121,7 @@ describe('useWalletsList', () => {
action_type: 'deposit',
amount: 1000,
balance_after: 1000,
gradient_class: 'wallet-card__usd-bg',
transaction_id: 17494117539,
transaction_time: 1685769338,
account_category: 'wallet',
Expand Down
11 changes: 7 additions & 4 deletions packages/hooks/src/__tests__/useWalletsList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('useWalletsList', () => {
const mock = mockStore({
client: {
accounts: { CRW909900: { token: '12345' } },
currency: 'USD',
loginid: 'CRW909900',
is_crypto: () => false,
},
Expand Down Expand Up @@ -59,16 +60,18 @@ describe('useWalletsList', () => {
expect(result.current.data).toEqual([
{
account_category: 'wallet',
balance: 0,
currency: 'USD',
gradient_card_class: 'wallet-card__usd-bg',
gradient_header_class: 'wallet-header__usd-bg',
landing_company_shortcode: 'svg',
is_virtual: 0,
landing_company_name: 'svg',
landing_company_shortcode: 'svg',
icon: 'IcWalletCurrencyUsd',
is_demo: false,
is_selected: false,
is_malta_wallet: false,
balance: 0,
is_selected: false,
is_virtual: 0,
name: 'USD Wallet',
},
]);
});
Expand Down

0 comments on commit 49e6286

Please sign in to comment.