You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tag:
Branch:
Tree:
119693fe05
develop
feature/default_network_editable
v10.22.3
${ noResults }
31 lines
933 B
31 lines
933 B
import React from 'react';
|
|||
import { shallow } from 'enzyme';
|
|||
|
import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction';
|
||
import TransactionBreakdown from './transaction-breakdown.component';
|
|||
|
|
||
describe('TransactionBreakdown Component', () => {
|
|||
it('should render properly', () => {
|
|||
|
const transaction = {
|
||
history: [],
|
|||
id: 1,
|
|||
status: TRANSACTION_STATUSES.CONFIRMED,
|
|||
|
txParams: {
|
||
from: '0x1',
|
|||
gas: '0x5208',
|
|||
gasPrice: '0x3b9aca00',
|
|||
nonce: '0xa4',
|
|||
to: '0x2',
|
|||
value: '0x2386f26fc10000',
|
|||
},
|
|||
};
|
|||
|
|
||
const wrapper = shallow(
|
|||
|
<TransactionBreakdown transaction={transaction} className="test-class" />,
|
||
{ context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } },
|
|||
);
|
|||
|
|
||
expect(wrapper.hasClass('transaction-breakdown')).toStrictEqual(true);
|
|||
expect(wrapper.hasClass('test-class')).toStrictEqual(true);
|
|||
});
|
|||
});
|