Skip to content

Commit 054697c

Browse files
committed
test(predict): cover predictWithdraw in SUMMARY_SECTION_TYPES and mock usePredictAccountState
1 parent 15c5d48 commit 054697c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

app/components/Views/confirmations/components/activity/transaction-details/transaction-details.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,13 @@ describe('TransactionDetails', () => {
360360
TransactionType.moneyAccountWithdraw,
361361
TransactionType.perpsDeposit,
362362
TransactionType.predictDeposit,
363+
TransactionType.predictWithdraw,
363364
])('includes %s', (type) => {
364365
expect(SUMMARY_SECTION_TYPES).toContain(type);
365366
});
366367

367-
it('contains exactly 6 transaction types', () => {
368-
expect(SUMMARY_SECTION_TYPES).toHaveLength(6);
368+
it('contains exactly 7 transaction types', () => {
369+
expect(SUMMARY_SECTION_TYPES).toHaveLength(7);
369370
});
370371
});
371372
});

app/components/Views/confirmations/components/info/custom-amount-info/custom-amount-info.test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ jest.mock('../../../context/alert-system-context');
5454
jest.mock('../../../hooks/transactions/useTransactionCustomAmountAlerts');
5555
jest.mock('../../../hooks/pay/useTransactionPayMetrics');
5656
jest.mock('../../../hooks/send/useAccountTokens');
57+
jest.mock('../../../../../UI/Predict/hooks/usePredictAccountState', () => ({
58+
usePredictAccountState: () => ({
59+
data: undefined,
60+
isLoading: false,
61+
}),
62+
}));
5763
jest.mock('../../../hooks/pay/useTransactionPayAvailableTokens');
5864
jest.mock('../../../hooks/pay/useTransactionPayData');
5965
jest.mock('../../../hooks/pay/useTransactionPayHasSourceAmount');

0 commit comments

Comments
 (0)