2019-01-25 12:44:54 -08:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
2019-02-04 20:41:45 -08:00
|
|
|
import { render, cleanup } from 'react-testing-library';
|
2019-01-25 12:44:54 -08:00
|
|
|
import { ThemeProvider } from 'styled-components';
|
|
|
|
import 'jest-dom/extend-expect';
|
|
|
|
|
|
|
|
import { WalletAddress } from '../../app/components/wallet-address';
|
|
|
|
import appTheme from '../../app/theme';
|
|
|
|
|
|
|
|
afterEach(cleanup);
|
|
|
|
|
|
|
|
describe('<WalletAddress />', () => {
|
2019-01-31 08:41:32 -08:00
|
|
|
test('should render wallet address component correctly', () => {
|
|
|
|
const { queryByTestId } = render(
|
|
|
|
<ThemeProvider theme={appTheme}>
|
|
|
|
<div style={{ width: '700px' }}>
|
|
|
|
<WalletAddress
|
|
|
|
address='t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1'
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</ThemeProvider>,
|
|
|
|
);
|
2019-01-25 12:44:54 -08:00
|
|
|
|
2019-01-31 08:41:32 -08:00
|
|
|
expect(queryByTestId('Address')).toBeInTheDocument();
|
2019-01-25 12:44:54 -08:00
|
|
|
});
|
|
|
|
});
|