1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/ui/components/app/selected-account/selected-account-component.test.js
Alex Donesky aa070edd3f
Fixing address truncation papercuts (#12330)
* fixing address truncation papercuts
2021-10-13 12:54:48 -05:00

25 lines
726 B
JavaScript

import React from 'react';
import { render } from 'enzyme';
import SelectedAccount from './selected-account.component';
describe('SelectedAccount Component', () => {
it('should render checksummed address', () => {
const wrapper = render(
<SelectedAccount
selectedIdentity={{
name: 'testName',
address: '0x1b82543566f41a7db9a9a75fc933c340ffb55c9d',
}}
/>,
{ context: { t: () => undefined } },
);
// Checksummed version of address is displayed
expect(wrapper.find('.selected-account__address').text()).toStrictEqual(
'0x1B8...5C9D',
);
expect(wrapper.find('.selected-account__name').text()).toStrictEqual(
'testName',
);
});
});